Can I set java.library.path programmatically from java code itself?
The following doesn't work.
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.