Setting Djava.library.path programmatically (or alternatives)?

java, jvm

Solution

take a look at this java doc http://docs.oracle.com/javase/6/docs/api/java/lang/System.html#setProperty(java.lang.String, java.lang.String)

you want to call the setProperty(String, String) method.

so it would look something like this in your case

System.setProperty("java.library.path","value_you_want");

Problem

I am looking to set the VM argument Djava.library.path programmatically. If this can't be done, what are the alternatives (if there are any)?

Original source

Related problems