close

[Solved] Netbeans IDE 11 cannot access java.lang Fatal Error: Unable to find package java.lang in classpath or bootclasspath

Hello Guys, How are you all? Hope You all Are Fine. Today I am facing the following error Netbeans IDE 11 cannot access java.lang Fatal Error: Unable to find package java.lang in classpath or bootclasspath in Java. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Netbeans IDE 11 cannot access java.lang Fatal Error: Unable to find package java.lang in classpath or bootclasspath Error Occurs?

Today I am facing the following error Netbeans IDE 11 cannot access java.lang Fatal Error: Unable to find package java.lang in classpath or bootclasspath in Java.

How To Solve Netbeans IDE 11 cannot access java.lang Fatal Error: Unable to find package java.lang in classpath or bootclasspath Error ?

  1. How To Solve Netbeans IDE 11 cannot access java.lang Fatal Error: Unable to find package java.lang in classpath or bootclasspath Error ?

    To Solve Netbeans IDE 11 cannot access java.lang Fatal Error: Unable to find package java.lang in classpath or bootclasspath Error I also had the same issue. Solved using manually setting the default jdk.

  2. Netbeans IDE 11 cannot access java.lang Fatal Error: Unable to find package java.lang in classpath or bootclasspath

    To Solve Netbeans IDE 11 cannot access java.lang Fatal Error: Unable to find package java.lang in classpath or bootclasspath Error I also had the same issue. Solved using manually setting the default jdk.

Solution 1

I also had the same issue. Solved using manually setting the default jdk.

  1. open the netbeans.conf from <install_dir>/netbeans/etc
  2. set the JDK home path for netbeans_jdkhome property

I am using Ubuntu 19.10

Solution 2

After exiting netbeans edit the config file netbeans.conf using

nano ~/netbeans-11.2/netbeans/etc/netbeans.conf

In the line netbeans_jdkhome edit the path like

netbeans_jdkhome="/usr/lib/jvm/java-11-openjdk-amd64"

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read