13 years ago
Cannot set system properties such as java.library.path in Java App command line
We have set up a Java Application and included command line arguments in the parameters dialog.
-Djava.library.path="C:\Program Files\OurApp\Our App Folder\libraries"
We then included a sysout to print the java.library.path system property when the application runs. The property that we set in the command line is not what gets printed out. Rather it seems that the Windows PATH variable is what is being used as the java.library.path.
Also, we get null pointers when trying to access custom system properties that we have set which are not set by default.
e.g.
-Dmy.new.property="example property setting"
System.getProperty('my.new.property) results a null when running the application.
Thanks for the help, and please let us know if we can provide more information!
-Djava.library.path="C:\Program Files\OurApp\Our App Folder\libraries"
We then included a sysout to print the java.library.path system property when the application runs. The property that we set in the command line is not what gets printed out. Rather it seems that the Windows PATH variable is what is being used as the java.library.path.
Also, we get null pointers when trying to access custom system properties that we have set which are not set by default.
e.g.
-Dmy.new.property="example property setting"
System.getProperty('my.new.property) results a null when running the application.
Thanks for the help, and please let us know if we can provide more information!