2012-11-01 125 views
0

我試圖在J2ME中做一個簡單的hello世界程序,我在ubuntu 12.04上使用Netbeans 7.2.1。 package helloworld;J2ME模擬器沒有響應

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) { 
} 


} 

當我試圖運行上面的代碼模擬器不響應我嘗試按右側的啓動按鈕的仿真器沒有任何反應。這是當我運行

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 

能否請你幫輸出有什麼我失蹤?我是Netbeans的新手

回答

0

據我所知,/ dev/dsp是與OSS一起工作的設備。嘗試使用此命令加載它:

modprobe snd-pcm-oss