Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting error "cannot access java.lang, Unable to find package java.lang in classpath or bootclassp

 
Scott Roberts
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was using the NetBeans IDE 6.7, however on open an existing mobility project I get lots of red dots,

on rolling over the dot near the package statement it says

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


while the other red dots below near other class or Identifier statements say

"cannot find symbol"

I have JDK 1.6.0_14 installed.

I tried the following to correct the errors:
1. Reinstalled JDK 1.6.0_14 .
2. Reinstalled NetBeans 6.7.
3. Uninstalled NetBeans 6.7 and installed NetBeans 6.7.1

However nothing worked.

NetBeans menu Help-> gives the following info:

Product Version: NetBeans IDE 6.7.1 (Build 200907230233)
Java: 1.6.0_14; Java HotSpot(TM) Client VM 14.0-b16
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)

My Path environment variable is:

C:\Program Files\Microchip\MPLAB C30\bin;C:\MCC18\mpasm;C:\MCC18\bin;C:\Program Files\Microchip\MPLAB C30\bin;C:\Program Files\Java\jdk1.6.0_14\bin

I also searched google but could not find any valid answers.
What should I do?

Interestingly I get these errors only on Mobility projects and that too on opening an existing Mobility project,
New Mobility and J2SE projects dont give me any errors.
 
Aurelian Tutuianu
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps the old projects used an older version of jdk. Try to see that in the properties of the project, in the library section if the platform is configured right. Or drop the old platform configuration and use the default one.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic