Skip to main content

Error compiling class

1 reply [Last post]
blossompark
Offline
Joined: 2010-03-02

I am doing the J2ME tutorial here:
http://today.java.net/pub/a/today/2005/02/09/j2me1.html?page=2

I'm on step 3:Compile

My problem is I am unable to compile the DateTimeApp.java file,
I get a fatal error:Fatal Error: Unable to find package java.lang in classpath or bootclasspath (see below)

Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.

C:\Users\Rory>cd c:\wtk22\article

c:\WTK22\article>javac -bootclasspath ..\lib\cldcapi11.jar;..\lib\midpapi20.jar com\j2me\part1\DateTimeApp.java
Fatal Error: Unable to find package java.lang in classpath or bootclasspath

I think the issue is that the compiler cannot find the JRE... i have checked my CLASSPATH variable entries (see below)

C:\ProgramFiles\Java\jdk1.6.0_18;.;C:\ProgramFiles\Java\jre6\lib\ext\QTJava.zip;C:\Java_ME_platform_SDK_3.0;

and they seem ok to me, (cldcapi11.jar and midpapi20.jar are located at C:\Java_ME_platform_SDK_3.0\lib and at C:\Program Files\Java\jdk1.6.0_18\lib).....
I have also mirrorred the directory structure used in the tutorial...any pointers or advice greatly appreciated..thanks ...incredibly frustrating!!!!...

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jaywayjohan
Offline
Joined: 2008-06-18

I would recommend using NetBeans or Eclipse. No need to do command line compilation when you start learning Java.

Regards
Johan