am trying to do a simple hello world program in J2ME, I am using Netbeans 7.2.1 on ubuntu 12.04. package helloworld;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
/**
* @author mashombo
*/
public class Midlet extends MIDlet {
private TextBox tb;
private Display display = null;
public void helloworld(){
tb = new TextBox("Hello world Midlets"," -samboga", 100, 0);
}
public void startApp() {
if(display == null){
display = Display.getDisplay(this);
display.setCurrent(tb);
}
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
}
When I try to run the above code the emulator does not respond I try to press the launch button on the right side of the emulator nothing happens. Here is the output when I run
Starting emulator in execution mode
Running with storage root /home/mashombo/j2mewtk/2.5.2/appdb/DefaultGrayPhone
Running with locale: en_ZA.UTF-8
/dev/dsp: No such file or directory
Running in the identified_third_party security domain
Can you please help is there something i am missing? I am new to Netbeans
As far as I know /dev/dsp is a device to work with OSS. Try to load it with this command:
modprobe snd-pcm-oss
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.