|
-
Sep 23rd, 2003, 03:34 PM
#1
Thread Starter
Member
add classes
How do you add the classes so the import statment recognizes them. I'm building wireless apps targeting the J2ME runtime. I have it installed but these import statements are erroring out.
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
is there some sort of preference that I need to add? I running netbeans 3.5.1 for the IDE
-
Sep 23rd, 2003, 09:02 PM
#2
Hyperactive Member
Try downloading the J2ME toolkit from Sun... compiles projects for me OK. http://java.sun.com/products/j2mewtoolkit/download.html
See ya later,
-=XQ=-
"Reality is merely an illusion, albeit a very persistent one. "
- Albert Einstein (1879-1955)
This is the coolest site ever!!!
-
Sep 24th, 2003, 12:58 PM
#3
In addition to that you need to set the bootstrap classes with the -bootstrap compiler option.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Sep 25th, 2003, 01:20 AM
#4
Dazed Member
CornedBee might be right. The primordial or bootstrap classloader will search in the locations(directories and zip/jar files) specified in the sun.boot.class.path system property.
As far an i understand it the java core classes are loaded by the primordial classloader and application specific classes are loaded by the system (or application) classloader.
After dowloading the JCE i remember having to add locations to my classpath but no bootstrapping was done.
Last edited by Dilenger4; Sep 25th, 2003 at 10:53 PM.
-
Sep 25th, 2003, 10:49 AM
#5
Thread Starter
Member
So how do I set up this -boostrapper and classpath properties
-
Sep 25th, 2003, 02:57 PM
#6
javac -bootclasspath "path\to\j2me\bootstrap.jar" -classpath"path\to\classes;path\to\other\classes.jar" mymicroapp.java
etc...
Last edited by CornedBee; Sep 25th, 2003 at 03:02 PM.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Sep 25th, 2003, 03:01 PM
#7
Actually I used a bunch of batch files and installed them as a tool in EditPlus, worked really well, except that I manually had to edit one file every time...
builmeapp.bat
Code:
@echo compiling...
@call d:\work\java2\bin\javacme.bat @%1.jmk -g -d tmpclasses
@echo preverifying...
@call d:\work\java2\wtk\bin\prever.bat
@echo packaging...
@call d:\work\java2\wtk\bin\jarme.bat %1
@dir %1.jar
javacme.bat
Code:
@javac -bootclasspath d:\work\java2\wtk\lib\midpapi.zip %1 %2 %3 %4 %5 %6 %7 %8 %9
prever.bat
Code:
@d:\work\java2\wtk\bin\preverify.exe -d classes -cldc -classpath d:\work\java2\wtk\lib\midpapi.zip tmpclasses
jarme.bat
Code:
@jar cfm %1.jar %1.manifest.txt -C classes . -C res .
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|