views:

441

answers:

0

Hi
I have a console application, written in java, and packaged to an executable file (.exe) using InstallAnywhere.
Problem is, it seems that the LaunchAnywhere wrapper modifies the way command-line arguments are transferred to the application. (The application itself is some kind of SQL client wrapper, so correct arguments escaping and handling is very important for me)

For instance, when I run the following command:

mpcl Select --where "emp_name = 'eve' AND emp_id = 9" --fout out.log

On Linux systems I get (logging the arguments):

Running [mpcl] with the following command line arguments: [com.mycompany.mainclass.MPCL, SELECT, --where, emp_name = 'eve' AND emp_id = 9, --fout, out.log]

But on Windows systems I get:

Running [mpcl] with the following command line arguments: [SELECT, --where, emp_name, =, 'eve', AND, emp_id, =, 9 --fout out.log]

As you can see, the arguments are very different, and I can't parse it correctly any more.

My lax configuration file (after removing all the comments):

lax.application.name=mpcl.exe
lax.command.line.args=$CMD_LINE_ARGUMENTS$
lax.dir=C:\Program Files\mycompany\mpcl\
lax.main.class=com.diligent.vtf.manager.actions.MPCL
lax.main.method=main
lax.nl.current.vm=jre\jre\bin\java.exe
lax.nl.java.launcher.main.class=com.zerog.lax.LAX
lax.nl.java.launcher.main.method=main
lax.nl.java.option.additional=-Xdump:heap:opts=CLASSIC -Xdump:system:events=user -Xmx256m -Djava.awt.headless=true
lax.nl.valid.vm.list=1.4+
lax.nl.win32.microsoftvm.min.version=2750
lax.root.install.dir=C:\Program Files\mycompany\mpcl
lax.stderr.redirect=console
lax.stdin.redirect=console
lax.stdout.redirect=console
lax.user.dir=.
lax.version=9.5

I've searched the internet for similar problem with no luck.
Can anyone help, please?
Thanks