FULL PRODUCT VERSION :
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
Using the -version:<id> option when running a Java application will split arguments containing spaces.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the simple class added as a test case:
java -version:1.4+ ShowArgs 1 "2 3" 4
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Should produce:
1
2 3
4
ACTUAL -
But produces:
1
2
3
4
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class ShowArgs {
public static void main(String[] args) {
for (int i = 0; i < args.length; i++)
System.out.println(args[i]);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Do not use the -version: option.
###@###.### 2005-1-06 22:45:41 GMT