On Unix, use double quotes around "$0" to protect against
the case where the script may have spaces in its name.
On Windows, the name of the batch file is in variable %0,
available as "%~f0" for a quoted fully-qualified path.
The variable %1 is the first commandline arg, and is not
the right variable for -jar or -Xbootclasspath . This patch
puts "%~f0" into the right places and removes %1 as needed.
Enhancement: for such a short preamble, putting "@echo off"
is minor overkill - it is simpler to just have a "@" at
the start of the "java" and "goto" lines.
On Unix, use double quotes around "$0" to protect against the case where the script may have spaces in its name.
On Windows, the name of the batch file is in variable %0, available as "%~f0" for a quoted fully-qualified path. The variable %1 is the first commandline arg, and is not the right variable for -jar or -Xbootclasspath . This patch puts "%~f0" into the right places and removes %1 as needed.
Enhancement: for such a short preamble, putting "@echo off" is minor overkill - it is simpler to just have a "@" at the start of the "java" and "goto" lines.