-
Bug
-
Resolution: Fixed
-
P2
-
8, 9
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8163727 | 8u121 | Robert Mckenna | P2 | Resolved | Fixed | b01 |
JDK-8160978 | 8u112 | Robert Mckenna | P2 | Closed | Fixed | b03 |
JDK-8167854 | emb-8u121 | Robert Mckenna | P2 | Resolved | Fixed | b01 |
FULL PRODUCT VERSION :
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 10.0.10240]
A DESCRIPTION OF THE PROBLEM :
This is an error in the "java" launcher tool -- I couldn't find a category for that.
Command line arguments, quoted and containing the 2 adjacent characters "\\*", adds extra "\\" characters to the argument. Really odd. Examples:
Argument Character in arg received by process (raw, no escapes)
"a\*\b" a\*\\b
"a\*\*\b" a\*\\*\\\b
"a\*\*\*\b" a\*\\*\\\*\\\\b
This has been demonstrated on Windows 10 and Vista, using Java 8-60. I haven't test with older releases. I don't think it's a windows shell problem, as I get expected results using Python, Ruby, Go,
and a batch script. I suspect the "java" tool is doing something to the args.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run my little included program with arguments from my description.
E.g.
java Arg0 "a\*\b"
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
a\*\b"
ACTUAL -
a\*\\b
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Arg0.java
class Arg0 {
public static void main(String[] args) {
System.out.println(args[0]);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
None yet
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 10.0.10240]
A DESCRIPTION OF THE PROBLEM :
This is an error in the "java" launcher tool -- I couldn't find a category for that.
Command line arguments, quoted and containing the 2 adjacent characters "\\*", adds extra "\\" characters to the argument. Really odd. Examples:
Argument Character in arg received by process (raw, no escapes)
"a\*\b" a\*\\b
"a\*\*\b" a\*\\*\\\b
"a\*\*\*\b" a\*\\*\\\*\\\\b
This has been demonstrated on Windows 10 and Vista, using Java 8-60. I haven't test with older releases. I don't think it's a windows shell problem, as I get expected results using Python, Ruby, Go,
and a batch script. I suspect the "java" tool is doing something to the args.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run my little included program with arguments from my description.
E.g.
java Arg0 "a\*\b"
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
a\*\b"
ACTUAL -
a\*\\b
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Arg0.java
class Arg0 {
public static void main(String[] args) {
System.out.println(args[0]);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
None yet
- backported by
-
JDK-8163727 Showing incorrect result while passing specific argument in the Java launcher tools
- Resolved
-
JDK-8167854 Showing incorrect result while passing specific argument in the Java launcher tools
- Resolved
-
JDK-8160978 Showing incorrect result while passing specific argument in the Java launcher tools
- Closed
- duplicates
-
JDK-8154036 Java.exe corrupts command line arguments
- Closed
-
JDK-8074973 Command line arguments with *\ combinations get repeated \ characters.
- Closed