Reputation: 1958
I have used the accepted answer provided to the question "How to set the java.library.path from Eclipse?" for setting the library path for a specific jar.
In my case, I have about 10 third party jars and each jar depends on the same set of dlls, but I need to do this process for each jar. I can do this manually, but is there any way to do this for more than one jar at a time?
Upvotes: 1
Views: 2070
Reputation: 450
In your case, manually editing the project's .classpath
file might gain you a bit of efficiency. When I set the location of a JAR's native library, the following entry is added to my .classpath
file:
<classpathentry exported="true" kind="lib" path="path/to/library.jar" sourcepath="/path/to/src">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="path/to/native/library.dll"/>
</attributes>
</classpathentry>
You might manually set up the first JAR (via the Eclipse UI), close Eclipse and copy/paste the generated classpath entries in .classpath
with the appropriate modifications, and then restart Eclipse.
Upvotes: 1