Netbeans cannot access java.lang

Everything was working well until I updated my Netbeans to 2014. Since the update, I’ve been getting the following error message:

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

I’ve tried reinstalling Netbeans.


Is Java properly installed on your computer? If not there may be some kind of path issue with where Netbeans is looking for Java.

I believe so. I use BlueJ and it works fine. It does indeed seem like a path issue as you described, though.

I’m not sure if you’ve done this, but you might try installing the Netbeans and Java co-bundle. It will install both the java runtime system and netbeans at the same time and should make sure the paths are set correctly.

Then install the WPILib FRC plugins.

excellent, I’ll try this. thanks.

I encountered the same problem when I tried to use Netbeans to update the FRC plugins.

You must uninstall the plugins and delete the sunspotfrcsdk directory, then reinstall the plugins. Updating will not work.

This is mentioned (though not emphasized enough) in the Installing the Java development tools documentation.

Wow, that fixed it. I wasted so many hours on this problem…thanks a ton.

EDIT: This was directed to Tanis