How to add a library path?


how do i set a new library-path to the app?

im want to use native libraries (dlls).

This is not so easy as java doesnt allow registering native libraries in a jar manifest or loading them from a jar file by default. Also its different in webstart or when using a “standalone” jar file.

It should work when you create a new Library by going to Tools->Libraries and then specifying the folder with the natives in the “classpath” tab. However this will break automatic library inclusion and the one-click jar file with classpath due to the aforementioned problems.

@Momoko_Fan: Maybe we can generalize the native extraction system so that it would be usable for used natives too?

“native is a directory or can’t be read. Not copying the libraries.

Not copying the libraries.”

Its not working.

Yes it is, you should be able to use the libraries in your project. I was saying it does not copy the libraries to your distribution directory… You will have to copy them by hand and create a start batch file or something to run your software.

can just the program copy the native libs (in function of the os and version) at the root of the project at the startup ?, like that it’s still working by a “double click” on the jar file ?

To start it from the project they have to be in the root folder, for distribution the have to be in the dist folder (next to the jar)