5

I installed Ubuntu 18.04. Then I installed NetBeans with sudo apt-get install netbeans. Now NetBeans doesn't work. It gives cannot access java.lang errors, such as:

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

NetBeans doesn't work

1

You have NetBeans 10 version in Ubuntu 18.04 but your JDK is either version 11 (openjdk-11-jdk) or version 8 (openjdk-8-jdk), so install latest NetBeans version and openjdk-11-jdk instead. Apache NetBeans can be installed from the terminal in Ubuntu 18.04 with the following command.

sudo snap install netbeans --classic

The netbeans snap package includes the Base IDE, Java Development Tools and Plug-in Development Tools.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.