Forum Discussion

Menloqa's avatar
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!

1 Reply

  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi Kristi,


    To help us investigate the problem, please follow the steps below:

    1. Specify all the needed parameters for the Java application in the Parameters dialog and click OK.

    2. In the ensuing TestedApp editor, select the line that corresponds to the added application. The grey box at the top of the editor will contain the Command line field.

    3. Please post here the contents of this field.


    Also, please follow the instructions below:

    1. Specify the Simple mode for the same Java application. To learn how to do this, please refer to the Run Modes help topic.

    2. Post here the contents of the Command line filed for the item that runs the application in Simple mode.


    Thanks.