JDK-8321739 : Source launcher fails with "Not a directory" error
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 22,23
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86_64
  • Submitted: 2023-12-11
  • Updated: 2023-12-18
  • Resolved: 2023-12-12
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 22 JDK 23
22Fixed 23 b02Fixed
Related Reports
Relates :  
Description
To reproduce:
build the jdk, and go into the "bin" directory, where "java" and "javac" are located.
Execute some Test.java from there:
./java Test.java

jdk-23/fastdebug/bin/java/lang/Object.java; /oracle-work/jdk-23/fastdebug/bin/java/lang/Object.java: Not a directory
1 error
error: compilation failed
Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk22/pull/10 Date: 2023-12-12 15:36:06 +0000
12-12-2023

Changeset: df4ed7ef Author: Christian Stein <cstein@openjdk.org> Date: 2023-12-12 15:26:21 +0000 URL: https://git.openjdk.org/jdk/commit/df4ed7eff7cc4afb2f0bcfdbb2489715ab209737
12-12-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/17076 Date: 2023-12-12 08:56:58 +0000
12-12-2023

Use of `Files.notExists(p)` leads to that error on Unix-based systems. Changing this to `!Files.exists(p)` should fix the error.
12-12-2023