• 9
• 10
• 9
• 10
• 10

# "Package System does not exist" error [SOLVED]

This topic is 4306 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, I know what your all thinking, but i *have* spelt System correctly in my code! The background is that I've always relied on Eclipse, Eclipse ME and J2ME-Polish, but we have recently had to dump J2ME Polish and switch to using Antenna. Since the switch i've been plagued with problems, which i have managed to overcome, but this one has me stumped. Basically I get an error whenever I use the "System" object.('System.out.println' or 'System.currentTimeMillis' for example) It always worked before when but now it is not, and I cannot find any info about it on the net. When trying to compile my code for a different device, I get the following Error: "Unable to locate package java.lang in classpath or bootclasspath" and I think it is this which is why it cannot find the System package. As I said before I've relied on things to do all the setting up for me before, so now I don't know the basics!! Could somebody tell me how to set this up to use Ant and Antenna or at least give me some hints? Any help at all would be greatly appreciated! EDIT: I've also just noticed that I get another error: "cannot resolve symbol IOException" I assume there is something fundamentaly wrong with the way I've set things up (env variables or whatever), any ideas? [Edited by - Multiverse on July 7, 2006 11:29:51 AM]

##### Share on other sites
Looks like the bootclasspath property in Antenna's WtkBuild task is not pointing to the MIDP library. Which usually means you either have set the wtk.midpapi property incorrectly, or you haven't set it and wtk.home either points to a wrong directory or a non-UEI compliant SDK. Your best bet is pointing wtk.midpapi directly to the MIDP library (usually classes.zip or midpapi.zip).

Some links you might find useful:
A working Antenna build file, and the related thread.

If you still have problems you might want to post the build file you're using.

shmoove

##### Share on other sites
Hi Shmoove,

I've echo'd my path for the ${wtk.midpapi} in the build.xml and it points to the correct place: c:\WTK22\lib\midpapi10.jar it is definitely pointing to midpapi.jar, but is that the right thing to point at? I've also echo'd my${wtk.home} and got this output:

c:\WTK22
which is exactly where the WTK is on my drive.

My device.properties file (nokia7210.properties) looks like this:

shmoove