maffe opened a new issue, #4516:
URL: https://github.com/apache/netbeans/issues/4516

   ### Apache NetBeans version
   
   Apache NetBeans 14
   
   ### What happened
   
   The links in stacktraces do not work with JDK 9+.
   
   ### How to reproduce
   
   Run any code causing an exception in JDK code in a Maven project, for 
example:
   
   ```
   package com.acme.bugs.netbeans;
   
   import java.io.FileNotFoundException;
   import java.io.FileReader;
   
   public class StacktraceLink {
       public static void main(final String[] args) throws 
FileNotFoundException {
           new FileReader("nonexistent");
       }
   }
   ```
   
   Output:
   ```
   --- exec-maven-plugin:3.0.0:exec (default-cli) @ Test ---
   Exception in thread "main" java.io.FileNotFoundException: nonexistent (The 
system cannot find the file specified)
        at java.base/java.io.FileInputStream.open0(Native Method)
        at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
        at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
        at java.base/java.io.FileInputStream.<init>(FileInputStream.java:111)
        at java.base/java.io.FileReader.<init>(FileReader.java:60)
        at com.acme.bugs.netbeans.StacktraceLink.main(StacktraceLink.java:10)
   ```
   
   Clicking on a link starting with `java.base/` (or any other Java module) 
does not open the file and a message `Source file not found for 
"FileReader"`/`Source file not found for "FileInputStream"` appears in the 
status bar.
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Windows 10 64-bit
   
   ### JDK
   
   OpenJDK 18.0.2 Windows x64
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### Anything else
   
   Always happens with JDK 9+.
   
   NetBeans is running on OpenJDK 18.0.2 and the project uses an OpenJDK 18.0.2 
Maven toolchain. (Maven istself is running on Java 8, but that shouldn’t 
matter.)
   
   NetBeans found the sources when adding the JDK 18.0.2 platform and these 
files can be opened in the Debugging tab when using the debugger. The links do 
not work even when the matching JDK file is opened.
   
   I believe the links worked earlier when using Java 8 or older (without the 
module system).
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to