Fakrudeen Fakrudeen - 1 year ago 133
Java Question

Java.library.path setting programmatically

Can I set java.library.path programmatically from java code itself?

The following doesn't work.

System.setProperty("java.library.path", "/blah");

Answer Source

No you can't. This property is a read only value. You can change it at JVM launchin time with:


If you want to load a library from a specific location, you can use System.load(libraryPath) instead with the full path to the library.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download