-
Bug
-
Resolution: Fixed
-
P3
-
11.0.14
-
b10
-
x86_64
-
windows
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8282266 | 18.0.2 | Harold Seigel | P3 | Resolved | Fixed | b01 |
JDK-8282013 | 18.0.1 | Harold Seigel | P3 | Resolved | Fixed | b08 |
JDK-8281756 | 17.0.4-oracle | Harold Seigel | P3 | Resolved | Fixed | b01 |
JDK-8283502 | 17.0.4 | Goetz Lindenmaier | P3 | Resolved | Fixed | b01 |
JDK-8284080 | 15.0.8 | Yuri Nesterenko | P3 | Resolved | Fixed | b01 |
JDK-8284092 | 13.0.12 | Yuri Nesterenko | P3 | Resolved | Fixed | b01 |
JDK-8281749 | 11.0.16-oracle | Harold Seigel | P3 | Resolved | Fixed | b01 |
JDK-8283636 | 11.0.16 | Goetz Lindenmaier | P3 | Resolved | Fixed | b01 |
I'm running the following java command in a Windows Server 2016 operating system using the latest Java 11 version:
java -Xlog:gc*:file="C:\users\test_gc.log" -version
This completes successfully.
However, I would like to be able to do:
java -Xlog:gc*:file="C:/users/test_gc.log" -version
This fails due to the forward slashes in a Windows system. This would be normal in a cmd terminal; however, I'm testing the commands above in PowerShell which accepts both backslashes and forward slashes in paths.
In java 8, forward slashes were acceptable and both of the above commands worked (albeit with \\ for the backslash case). Furthermore, in Java 8 the quotes weren't required due to its xloggc syntax that didn't have a colon. Specifically in this bug report, I would like the bugged incompatibility with '/' to be addressed.
The loss of a universal forward slash in paths wreaks havoc with running software in Windows that has multiple embedded 3rd-party java components, as each embedded component parses the backslashes differently. Right now I have a combination of single backslashes, double backslashes, and even 4 backslashes as path separators for different java components (jboss, spark, hive). These are common java software products, and it is impossible to address all of their source codes to handle the \ in the same manner.
For java 11 gc paths to be usable on Windows, it must be able to accept '/' inputs as filepath separators. Thank you.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Install latest Java 8 Hotspot version on Windows 64.
Open PowerShell.
Enter (substitute User with your username):
java -Xloggc:C:/Users/User/Documents/gc8.log -version
Repeat with the latest Java 11 Hotspot version:
java -Xlog:gc*:file="C:/Users/User/Documents/gc11.log" -version
It will fail.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I expected this output:
openjdk version "11.0.14" 2022-01-18
OpenJDK Runtime Environment Temurin-11.0.14+9 (build 11.0.14+9)
OpenJDK 64-Bit Server VM Temurin-11.0.14+9 (build 11.0.14+9, mixed mode)
ACTUAL -
Error output:
Invalid -Xlog option '-Xlog:gc*:file=C:/Users/User/Documents/gc11.log', see error log for details.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
CUSTOMER SUBMITTED WORKAROUND :
Backslashes work:
java -Xlog:gc*:file="C:\Users\User\Documents\gc11.log" -version
FREQUENCY : always
- backported by
-
JDK-8281749 Upgrading from 8 to 11 no longer accepts '/' as filepath separator in gc paths
- Resolved
-
JDK-8281756 Upgrading from 8 to 11 no longer accepts '/' as filepath separator in gc paths
- Resolved
-
JDK-8282013 Upgrading from 8 to 11 no longer accepts '/' as filepath separator in gc paths
- Resolved
-
JDK-8282266 Upgrading from 8 to 11 no longer accepts '/' as filepath separator in gc paths
- Resolved
-
JDK-8283502 Upgrading from 8 to 11 no longer accepts '/' as filepath separator in gc paths
- Resolved
-
JDK-8283636 Upgrading from 8 to 11 no longer accepts '/' as filepath separator in gc paths
- Resolved
-
JDK-8284080 Upgrading from 8 to 11 no longer accepts '/' as filepath separator in gc paths
- Resolved
-
JDK-8284092 Upgrading from 8 to 11 no longer accepts '/' as filepath separator in gc paths
- Resolved
- links to
-
Commit openjdk/jdk11u-dev/8eeba890
-
Commit openjdk/jdk13u-dev/74ca486f
-
Commit openjdk/jdk15u-dev/db936112
-
Commit openjdk/jdk17u-dev/aafda8cd
-
Commit openjdk/jdk18u/09dfa48c
-
Commit openjdk/jdk/84868e39
-
Review openjdk/jdk11u-dev/935
-
Review openjdk/jdk13u-dev/333
-
Review openjdk/jdk15u-dev/189
-
Review openjdk/jdk17u-dev/270
-
Review openjdk/jdk18u/27
-
Review openjdk/jdk/7415