Hi,
i have a problem, running java in linux iPAQ. Here is my problem: I have install Blackdown on my iPAQ and it works prefectly on my iPAQ.Now I just wondering my Blackdown only run on command line hyperterminal is there any other way to run my Blackdown?Now I try to run my java app shown below :
//include the MIDlet super class
import javax.microedition.midlet.MIDlet;
//include the GUI libraries of MIDP
import javax.microedition.lcdui.*;
public class HelloWorldMIDlet extends MIDlet {
static HelloWorldMIDlet instance;
HelloWorldDisplayable displayable = new HelloWorldDisplayable();
/**Construct the midlet*/
public HelloWorldMIDlet() {
this.instance = this;
}
/**Main method*/
public void startApp() {
Display.getDisplay(this).setCurrent(displayable);
}
/**Handle pausing the MIDlet*/
public void pauseApp() {
}
/**Handle destroying the MIDlet*/
public void destroyApp(boolean unconditional) {
}
/**Quit the MIDlet*/
public static void quitApp() {
instance.destroyApp(true);
instance.notifyDestroyed();
instance = null;
}
public class HelloWorldDisplayable extends Form implements CommandListener {
/**Construct the displayable*/
public HelloWorldDisplayable() {
super("Testing");
// set up this Displayable to listen to command events
setCommandListener(this);
try {
initDisplay();
}
catch(Exception e) {
e.printStackTrace();
}
}
/**Component initialization*/
private void initDisplay() throws Exception {
// add the Quit command
addCommand(new Command("Quit", Command.STOP, 1));
this.append(new String ("Hello World"));
}
/**Handle command events*/
public void commandAction(Command c, Displayable d) {
if (c.getCommandType() == Command.STOP) {
// stop the MIDlet
HelloWorldMIDlet.quitApp();
return;
}
}
}
}
I have already compiled it and try to run it on the J2ME WirelessToolKit and it works fine.So I transfer my *.java and my *.class into my iPAQ and when i try to run it show an Error MSG saying that there is no class definition found etc. So i thought it best to convert it to *.jar but when i try to run it ,it show an error message also saying no class definitaion; files or directory cannot be found. I've cheack my *.java over and over again but I think it's not the coding problem so i think the problem might lies in setting the correct class path but I don't know how to set it so if the problem lies in the setting the path, please guide me step-by-step this is only my assumption.Or my other assupmtion maybe I must download all the class onto my iPAQ if that the case I also don't know how to go about it. So please guide me in how to upload and setting the class path.
I'm at my very ends now so can someone be so kind to help me solve my problem..Million Thanks..