Hi i downloaded the wireless tool kit 2.5.2, my machine is very slow and takes too long to execute the program in addition i had compiled some small java programs with command line successfully in j2se with the command line, very simple and fast, well i was reading that this can be done too with the j2me plattform but doing it differently. I spent a day completely reading about the topic but im failing, im doing everything supposedly right, but i havent reached the aim of creating the class file. First, setting the path was so much painful and frustating, is there a way to set it permanently using the command line? I did it using the right click on mypc, and clicking on enviroment variables.
Well, going back to the main reason for posting, i have installed the wireless plattform this way
c:\wtk252\lib and i have a midlet in this directory c:\ChoiceGroupDemo.java, i have the java bin directory and the wireless toolkit bin directory set to path for using the javac command and preverify command respectively, the instructions i found on the net are a little old but are meaningful cause i found that even a batch file can be created for optimizing the process. The problem is that i dont know what classes should i use with the bootclasspath operator, in the example some ones used midpapi.zip others used classes.zip but i have no one of them instead i have in c:\wtk252\lib\midpapi10.jar, midpapi20.jar, and midpapi21.jar in addition to others
Well i did this on the command line
c:\javac -bootclasspath c:\wtk252\lib\midpapi10.jar ChoiceGroupDemo.java
and i get 6 errors: cannot access java.lang.string
cannot access java.lang.object
package system does not exist
cannot find symbol
"
"
i tried using the midpapi20.jar library and happened the same
i tried this
c:\javac -bootclasspath c:\wtk252\lib\*.jar ChoiceGroupDemo.java
and i got this: invalid flag :c:\wtk252\lib\cldcapi11.jar
I dont know if im misdirecting the bootclasspath operator to the right libraries, what do you thing guys, by the way , this is the small midlet im trying to compile: "ChoiceGroupDemo.java"
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class ChoiceGroupDemo extends MIDlet implements CommandListener {
private boolean boolMotion=false;
Display mDisplay;
Form frm;
ChoiceGroup cg;
Command cmd;
ChoiceGroupDemo() {
frm=new Form("Choice Group Demo");
cg=new ChoiceGroup("Choose Movie:",Choice.MULTIPLE);
cmd=new Command("OK",Command.OK,1);
cg.append("Horror",null);
cg.append("Comedy",null);
cg.append("Action",null);
frm.append(cg);
frm.setCommandListener(this);
}
public void commandAction(Command c, Displayable d) {
for(int i=0;i<3;i++) {
if(cg.isSelected(i)) {
System.out.println("u selected :" +
cg.getString(elementNum));
return;
}
}
}
public void startApp() {
mDisplay = Display.getDisplay(this);
mDisplay.setCurrent(frm);
}
public void pauseApp() {}
public void destroyApp(boolean unconditional){}
}
