This is driving me crazy:
In Netbeans (6.9.1 on a 64bit Windows 7) with JDK 6 correctly installed, the Editor shows this Error at package my.package.name:
cannot access java.lang
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
The Project compiles just fine, it is just the Editor messing up. Other projects in the same IDE work just fine. Other types of Projects (the errornous is a J2SE Project) work fine.
I tried to Google this, but there are always solutions about that the JDK was not installed right or links to it were corrupt in the project files. This is not the case here. I double and tripple checked the JDK installation: it is ok. Other projects do not show that behaviour in the very same IDE and are using the same JDK.
I diff'ed the project files against correct working project files and could not see any major differences except from those that are expected to be there.
I tried to delete the project and make a new one with existing sources. This works at first glance but once I close the IDE and open it again the same failure will show up.
I tried to revert from SVN to an older version of the project files before this happened: no chance.
In all files of that project I have that error and of course a lot of "cannot find symbol", which prevents also autocomplete and everything.
Does anyone know why this happens and how I can make it stop? It is really more than annoying and I cannot just switch to Eclipse (not my decision).
Any attempt to help will be highly appreciated!
P.S.: Edith just reminded me to tell you that I did not try to reinstall Netbeans since I read in one of the articles I found through Google that it will not help.
Update
This is from netbeans.conf:
netbeans_jdkhome="C:\Program Files\Java\jdk1.6.0_27"
And it is the only JDK I have so this should be perfectly correct.
Update 2
Loads of Plugins: Ada, Android, Ant, Bundeled Subversion Client for Windows, C/C++, Database, EJB and EAR, GUI Builder, Hibernate, Hudson, IDE Branding, Identity Management, IDE Platform, Java, Java -Debugger, -Persistence, -Profiler, -Web Applications, JSF, Local History, Maven, Mercurial, Mobility, Netbeans Plugin Development, RCP Platform, RESTful Web Services, soupUI WebService Testing, SOAP Web Services, SOftware as a Service, Spellchecker, - English DIctionaries, Spring Beans, Spring Web MVC, Struts, Subversion, Team.
Update 3
Checked rt.jar: It is on the bootclasspath,
build.properties has
platforms.JDK_1.6.bootclasspath=....${platforms.JDK_1.6.home}\\jre\\lib\\rt.jar;...
Reinstalling Netbeans did not change anything.
@JRL : No commandline switches are used.
Ok, I do not know why it worked, but it worked:
Somehow this folder was still present after reinstallation. Got that tip from a colleague. He neither knows the exact reason why this behaviour pops up nor why it goes away when you force Netbeans to recreate "cache". But it works.
Thanks a lot to all of you for trying to help me!