Where should I list native libraries for my Java application?

I know the JVM uses the property java.library.path

to find native libraries at runtime. I am trying to set up Eclipse with a local dependency location.

But Eclipse->Project Properties->Build Path

there are many places. I can specify the location.

  • Source Tab → Source Library Location

enter image description here

  • Libraries Tab → JRE System Library → Source Library Location.

enter image description here

  • And for each external banner there is an entry in the Native library cell.

As I tried, it seems that no matter where I configure it , it is always put in java.library.path

before my application starts.

Which one should I use?

If they all go to the same destination, why are there so many configuration entries?

So far, in my opinion, the Eclipse designer hopes this way will help programmers organize their native libraries more logically .

+3


source to share


1 answer


This tab inside eclipse is placed on the build path at runtime and is going to be organized based on the library you put on the path, not the eclipse interface you designated it.



As you mentioned, it makes more logical sense to use an interface rather than any actual change to its location. Personally, I prefer to use the "native library" in the source tab, but that is just not the way it should be.

+1


source







All Articles