-
Bug
-
Resolution: Fixed
-
P4
-
21, 22
-
Intel(R) Xeon(R) Platinum 8260 CPU 2.4GHz, 2 core, 8GB Memory
Windows 10 Enterprise
-
b22
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8322301 | 21.0.3 | Kimura Yukihiro | P4 | Resolved | Fixed | b01 |
JDK-8322654 | 17.0.11 | Kimura Yukihiro | P4 | Resolved | Fixed | b01 |
JDK-8324633 | 11.0.23 | Kimura Yukihiro | P4 | Resolved | Fixed | b01 |
JDK-8330466 | openjdk8u422 | Kazuhisa Takakuri | P4 | Resolved | Fixed | b01 |
because it dose not work as intended.
First, the purpose of BootClassPathTest.sh is to test non US-ASCII characters
in the value of the Boot-Class-Path in MANIFEST.MF,
but it fails to create the path on some environments.
The path name is defined at names[][] array in Setup.java, which is defined based on Charset.defaultCharset().name().
Setup.java uses sun.jnu.encoding property for JEP 400, therefor names[][] array should be defined based on sun.jnu.encoding.
Second, the BOOTDIR environment value in BootClassPathTest.sh is not set correctly on the Windows cygwin.
BOOTDIR=`cat ${TESTCLASSES}/boot.dir`
"$JAVAC" ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d "${BOOTDIR}" \
"${TESTSRC}"/AgentSupport.java
The path name is written in the file boot.dir with the native encording,
but the default encording is UTF8 on the Windows cygwin.
This is the reason why BootClassPathTest.sh fails to pass the directory name to JAVAC -d "${BOOTDIR}"
As a side note, the directory is created with the native encording correctly.
I tried to use LANG/LC_CTYPE/LC_ALL according to https://cygwin.com/cygwin-ug-net/setup-locale.html, but it does not work well.
The only way that works is to write the path name in boot.dir with UTF8
which is the default encording on the Windows cygwin.
I would like to make two modifications to this test.
If the second modification has not done it fails on Japanese Windows with the following error:
Exception in thread "main" java.nio.file.InvalidPathException: Illegal char <?> at index 106: C:/work/jdk_latest/jdk/tes
t/jdk/JTwork/classes/java/lang/instrument/BootClassPath/BootClassPathTest.d\\boot???{??
at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:204)
at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:175)
at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:231)
at java.base/java.nio.file.Path.of(Path.java:148)
at java.base/java.nio.file.Paths.get(Paths.java:69)
at jdk.compiler/com.sun.tools.javac.main.Arguments.checkDirectory(Arguments.java:861)
at jdk.compiler/com.sun.tools.javac.main.Arguments.validate(Arguments.java:471)
at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:278)
at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:178)
at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:66)
at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:52)
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:560)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:572)
Caused by: java.lang.ClassNotFoundException: AgentSupport
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:421)
at java.base/java.lang.Class.forName(Class.java:412)
at Agent.premain(Agent.java:36)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
... 3 more
- backported by
-
JDK-8322301 jdk/java/lang/instrument/BootClassPath/BootClassPathTest.sh fails on Japanese Windows
- Resolved
-
JDK-8322654 jdk/java/lang/instrument/BootClassPath/BootClassPathTest.sh fails on Japanese Windows
- Resolved
-
JDK-8324633 jdk/java/lang/instrument/BootClassPath/BootClassPathTest.sh fails on Japanese Windows
- Resolved
-
JDK-8330466 jdk/java/lang/instrument/BootClassPath/BootClassPathTest.sh fails on Japanese Windows
- Resolved
- links to
-
Commit openjdk/jdk8u-dev/68ab0f3b
-
Commit openjdk/jdk11u-dev/1c12d16a
-
Commit openjdk/jdk17u-dev/4144ef36
-
Commit openjdk/jdk21u-dev/947dfc48
-
Commit openjdk/jdk/d051f222
-
Review openjdk/jdk8u-dev/440
-
Review openjdk/jdk11u-dev/2456
-
Review openjdk/jdk17u-dev/1990
-
Review openjdk/jdk21u-dev/36
-
Review openjdk/jdk21u/416
-
Review openjdk/jdk/16235