What is your OS ? Is it Windows NT/2000 ?
Assuming that you are using windows I will answer the question.
First the problem you are having with your existing setup is
1. U got to add G:\J2MEWTK\bin; to you System path in the environment variables.
2.when you give -bootclasspath option for the compiler you mean to say that ignore the default classpath and just consider the path and the class files you mention in the bootclasspath. And if u open that kvem.jar file you can see that it doesn't have java.lang package. So, the compiler couldn't find java.lang package.
3. Having a your class files in jdk/bin directory is not suggested. So, create your own new folder in G drive say for example "jyothi" and include current directory (".") in your CLASSPATH. If you want to override the system CLASSPATH. You got include "." in the bootclasspath too.
Now coming back to how to get it work:
I would suggest you to first run the existing example before you run the sample MIDlet that you wrote, just to fix the problem of configuration and setup errors.
There are many ways to get that working, I will write on of it here.
download MIDP profile
http://java.sun.com/products/midp/ and click on a Reference implementation.
create a new folder called j2ME on G drive and save it into g:/j2ME folder. Unzip them into the same folder.
set the CLASSAPATH=G:\j2ME\midp-fcs\classes;. ("." to include current directory as explained before)
add to the System PATH G:\j2ME\midp-fcs\bin
If you look into the classes of midp-fcs you will find all the classes required to compile your file Helloworld.java.
So, now your good to go and run your example Helloworld.java from joythi folder by
calling
javac -bootclasspath g:\j2ME\midp-fcs\classes Helloworld.java
Let me know if you still come across problem running it.
good luck
-chakri
Originally posted by jyothi sanka:
Hi chakri,
I installed jdk1.3,and j2me in G directory.I want to run midlet.
First I gave this command
(G:\set SUNJ2MEHOME=G:\J2MEWTK)
afterwards I gave this command
(g:\>g:\jdk1.3\bin\javac -g:none -bootclasspath %SUNJ2MEHOME%\lib\kvem.jar HelloWorld.java)
then I am getting this message
"Fatal error unable to locate package java.lang in classpath or bootclasspath"
Can you explain me why i am getting this error message?
And one more thing I saved my helloWorld.java file in jdk1.3\bin directory.I don't know where I hava to save those java files.
thanks for your cooperation
Jyothi