Tosken
Posts: 15
Joined: Wed Oct 09, 2013 11:51 am

Passing Arguments with Java product exe wrapper

Hi,

we use advanced installer to deploy our java program (jar).
When starting the jar file the program expects a command line parameter (like --imagepath=test.png).
As i figured out, the generated exe wrapper passes given arguments automatically to the jvm when starting the jar.
A call to wrapper.exe --imagepath=test.png does work and the java programm receives the imagepath parameter as argument.
But i am not able to use any whitespaces in the path.
I tried the following possibilities but non of them work:
- wrapper.exe --imagepath="c:\path with spaces\test.png" -> results in "c:\path as parameter
- wrapper.exe --imagepath='c:\path with spaces\test.png' -> results in 'c:\path as parameter
- wrapper.exe --imagepath=c:\path with spaces\test.png -> results in c:\path as parameter

Can you please give me some advice how to pass parameters with space with the exe wrapper to my program?
Thank you in advance

Sebastian
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Passing Arguments with Java product exe wrapper

Hello Sebastian and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

Can you please try to use the following command line statement and see if the behavior still persist:

Code: Select all

"--imagepath=c:\path with spaces\test.png"

Please let us know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Tosken
Posts: 15
Joined: Wed Oct 09, 2013 11:51 am

Re: Passing Arguments with Java product exe wrapper

Sorry for my late reply.
Thank you Dan your solution works fine.

Best regards
Sebastian
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Passing Arguments with Java product exe wrapper

You're welcome Sebastian.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”