This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- LaunchAnywhere adding file path to command line arguments passed to jar
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 14, 2018
12:58 PM
LaunchAnywhere adding file path to command line arguments passed to jar
We use the LaunchAnywhere feature to create executables for many Java applications that take in arguments. When we run the executable created by LaunchAnywhere on the command line along with the arguments we pass in, if the argument we pass in is the same as a file or folder in the directory we are running from, the path to the directory is concatenated to the beginning of the argument before passed to our application.
For example, we have a java program TestProgram.java that takes in a String as an argument for the attribute -f. We have LaunchAnywhere create an exectuable called TestProgram.exe that gets put down in "C:/Program Files/My Program". The directory "C:/Program Files/My Program"" has a folder in it called "Test". So, if we try to run "TestProgram.exe -f Test" from the command line in, what gets passed to the Java program is "C:/Program Files/My Program/Test" instead of just the string "Test". Is there a setting in LaunchAnywhere to prevent this?
For example, we have a java program TestProgram.java that takes in a String as an argument for the attribute -f. We have LaunchAnywhere create an exectuable called TestProgram.exe that gets put down in "C:/Program Files/My Program". The directory "C:/Program Files/My Program"" has a folder in it called "Test". So, if we try to run "TestProgram.exe -f Test" from the command line in, what gets passed to the Java program is "C:/Program Files/My Program/Test" instead of just the string "Test". Is there a setting in LaunchAnywhere to prevent this?
(0) Replies
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)