aspose file tools*
The moose likes Java Micro Edition and the fly likes  getting error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark " getting error "cannot access java.lang, Unable to find package java.lang in classpath or bootclassp" Watch " getting error "cannot access java.lang, Unable to find package java.lang in classpath or bootclassp" New topic
Author

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

Scott Roberts
Greenhorn

Joined: Aug 05, 2009
Posts: 11
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

Joined: May 13, 2004
Posts: 86
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.


http://javasign.blogspot.com/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getting error "cannot access java.lang, Unable to find package java.lang in classpath or bootclassp