This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 252746

Summary: com.sun.tools.javac.code.Symbol$CompletionFailure: Fatal Error: Unable to find package java.lang in classpath or bootclasspath
Product: java Reporter: Jiri Kovalsky <jkovalsky>
Component: CompilerAssignee: Dusan Balek <dbalek>
Status: RESOLVED FIXED    
Severity: normal CC: mentlicher
Priority: P3 Keywords: JDK_9
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 217687
Attachments: stacktrace
Required project dump file.
stacktrace

Description Jiri Kovalsky 2015-06-02 11:35:18 UTC
Build: NetBeans IDE Dev (Build 201506020405)
VM: Java HotSpot(TM) 64-Bit Server VM, 1.9.0-ea-b66, Java(TM) SE Runtime Environment, 1.9.0-ea-b66
OS: Linux

User Comments:
jkovalsky: My Maven based project had unresolved problems (reference to missing JDK 1.8 platform) so I decided to resolve it. In "Resolve Project Problems" dialog I clicked "Resolve..." button, there were two "JDK 1.9" and "JDK 1.9 (Default)" registered platforms, so I selected "JDK 1.9", clicked "Remove" button and then clicked "Add Platform..." button. This exception was thrown and dialog for adding new Java Platform opened.




Stacktrace: 
com.sun.tools.javac.code.Symbol$CompletionFailure: Fatal Error: Unable to find package java.lang in classpath or bootclasspath
   at com.sun.tools.javac.comp.TypeEnter$ImportsPhase.importAll(TypeEnter.java:435)
   at com.sun.tools.javac.comp.TypeEnter$ImportsPhase.resolveImports(TypeEnter.java:338)
   at com.sun.tools.javac.comp.TypeEnter$ImportsPhase.access$1700(TypeEnter.java:286)
   at com.sun.tools.javac.comp.TypeEnter.lambda$ensureImportsChecked$47(TypeEnter.java:173)
   at com.sun.tools.javac.comp.TypeEnter.finishImports(TypeEnter.java:224)
   at com.sun.tools.javac.comp.TypeEnter.ensureImportsChecked(TypeEnter.java:173)
Comment 1 Jiri Kovalsky 2015-06-02 11:35:20 UTC
Created attachment 154011 [details]
stacktrace
Comment 2 Jiri Kovalsky 2015-06-02 11:38:23 UTC
Created attachment 154013 [details]
Required project dump file.
Comment 3 Jiri Kovalsky 2015-06-02 11:46:32 UTC
Most probably another JDK 9 specific issue as this does not happen when IDE is run on JDK 1.8.0_45. Please remove the keyword if my assumption is wrong.
Comment 4 Martin Entlicher 2015-06-03 06:44:13 UTC
Created attachment 154027 [details]
stacktrace

Opened an existing Java project using JDK 8 platform in NetBeans running on JDK 9. JDK 8 platform is not defined and Resolve Project Problems is correctly available. But this exception should not be thrown.
Comment 5 Dusan Balek 2015-11-20 12:47:51 UTC
Fixed in jet-main jdk9.

http://hg.netbeans.org/main/nb-javac-jdk9/rev/a00a59e3f01b