Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2132650 | 5.0u7 | Joseph Kowalski | P3 | Resolved | Fixed | b01 |
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
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
- backported by
-
JDK-2132650 -version:<id> argument affects application arguments containing spaces
- Resolved
- relates to
-
JDK-6468220 (process) Runtime.exec(String[]) does not pass command line arguments correctly (win)
- Closed
-
JDK-6276512 (process) Runtime.exec(cmd[]) ignores quotes around arguments (win)
- Closed