I'm working on a Windows system, which used to launch the following command in a batchfile:
"C:\...\java" -Xnoclassgc -noverify -XX:NewSize=32m ... -classpath ... <Main_Class> <list of parameters>
As I had some issues with the classpath, I've altered this into:
set Variable="C:\...\java" -Xnoclassgc -noverify -XX:NewSize=32m ... -classpath ... <Main_Class> <list of parameters>
start %Variable%
Now I'm getting the error message The system cannot find the file -Xnoclassgc.
Is this due to the start
command, are there other side-effects which are not visible at first (heap size or other limitations which are not longer taken into account, ...) and can I solve this while keeping the start
command?
From http://www.computerhope.com/starthlp.htm:
Windows Vista and later syntax
START ["title"] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED] [/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL] [/NODE ] [/AFFINITY ] [/WAIT] [/B] [command/program] [parameters]
This means that if the first Parameter of start is in doubleqotes it is taken for the Title of the new DOS box and the second argument stands in for the file to be executed.
So add another double quoted string after start
:
set Variable="This is the title of the DOS box" "C:\...\java" -Xnoclassgc -noverify -XX:NewSize=32m ... -classpath ... <Main_Class> <list of parameters>
start %Variable%