JDK-8191521 : handle long relative path specified in -Xbootclasspath/a on windows
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9,10,11,13
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • CPU: x86_64
  • Submitted: 2017-11-18
  • Updated: 2021-06-07
  • Resolved: 2019-10-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13 JDK 14
11.0.13-oracleFixed 13.0.2Fixed 14 b17Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
On windows, if a long relative path is specified in -Xbootclasspath/a, the class cannot be found.

$MYJDK/bin/java -Xbootclasspath/a:./yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy Hello
Error: Could not find or load main class Hello
Caused by: java.lang.ClassNotFoundException: Hello

The -cp option doesn't have this problem.

This is an existing problem in jdk9, probably in earlier releases as well.
Comments
@Ramkumar: you're right about the comment regarding -Xbootclasspath/a on windows. Will fix that via JDK-8232168.
23-10-2019

Fix Request I would like to have the patch as well in jdk11, because the fixed issue is also in jdk11 . Backport RFR discussion: https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2019-October/002034.html
22-10-2019

In test/hotspot/jtreg/runtime/LoadClass/LongBCP.java, the following comments still exists. // relative path tests // We currently cannot handle relative path specified in the // -Xbootclasspath/a on windows. Shouldn't this be removed?
17-10-2019

Fix Request I would like to have the patch as well in jdk13, because the fixed issue is also in jdk13 . Backport RFR discussion: https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2019-October/002002.html
10-10-2019

URL: https://hg.openjdk.java.net/jdk/jdk/rev/ed5e399d967d User: rschmelter Date: 2019-10-01 12:13:58 +0000
01-10-2019

Fix for JDK-8188122 handles absolute path but not relative path. The relative path needs to be expanded to full path via the windows _fullpath()/_wfullpath() function before specifying an extended-length path by using the "\\?\" prefix. As part of this RFE, we're thinking of using only the unicode version of windows API's in os::stat() even for path with length < MAX_PATH.
20-11-2017

Isn't this JDK-8188122 ??
19-11-2017