3

I know that JVM use the java.library.path property to locate the native libraries at run time. I am trying to configure Eclipse with the native dependency location.

But there are many places in Eclipse->Project Properties->Build Path I can specify the location.

  • The Source tab -> Native library location

enter image description here

  • The Libraries tab -> JRE System Library -> Native library location.

enter image description here

  • And for each external jars, there's a Native library location entry.

As I tried, it seems no matter where I configure it, it is always put in the java.library.path before my application starts.

Which one should I use?

If they all goes to the same destination, why so many config entries?

So far, my guess is, the designer of Eclipse hope this way can help programmers organize their native libraries more logically.

smwikipedia
  • 61,609
  • 92
  • 309
  • 482

1 Answers1

1

That tab within eclipse is all put onto the buildpath at runtime and is going to be organized based on the library you are putting onto the path not where in the eclipse UI you designate it.

As you mentioned it is more for a logical easier to use UI as opposed to any actual change to where it is located. Personally I prefer using the "Native Library" in the source tab but that is just out of preference.

mstelz
  • 610
  • 4
  • 9
  • 19