현재 Java ME SDK 3.0.5가 설치되어 있으며 Eclipse에서 MIDLET을 실행 중입니다.Eclipse에서 J2ME 에뮬레이터가 열리지 않는 것 같습니다.
나는 콘솔에 다음과 같은 데이터를 얻을 에뮬레이터 장치에서 응용 프로그램 실행하면 :
Syntax:
emulator [arguments]
In order to get commands supported by given device run:
emulator.exe -Xdevice:<device name> -Xquery
Generic list of arguments is:
-version Display version information about the emulator
-help Display list of valid arguments
-classpath, -cp The class path for the VM
-D<name>=<value> Set a system property
-Xdebug Use a remote debugger
-Xrunjdwp:[transport=<transport>,address=<address>,server=<y/n>,
suspend=<y/n>]
Debugging options
-Xdevice:<device> Select a device skin for the emulator
-Xdomain:<domain_name>
Set the MIDlet suite's security domain
-Xmain:<main class name>
Run the main method of a Java class, as in Java SE
-Xquery Print device information
모든 괜찮을 것 같다,하지만 난 에뮬레이션의 어떤 형태를 표시하지 수 있습니다.
여기에 문제가 있다고 생각하지 않지만 여기는 내 MIDLET 코드입니다.
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
import javax.microedition.lcdui.*;
public class Hello extends MIDlet implements CommandListener {
private Command exitCommand;
private Display display;
private Form screen;
public Hello() {
display = Display.getDisplay(this);
exitCommand = new Command ("Exit", Command.EXIT, 2);
screen = new Form ("Hello World");
StringItem strItem = new StringItem ("","Hello World");
screen.append (strItem);
screen.addCommand (exitCommand);
screen.setCommandListener(this);
}
public void startApp() throws MIDletStateChangeException {
// set the current display to the screen
display.setCurrent(screen);
}
public void pauseApp() {
// TODO Auto-generated method stub
}
public void destroyApp(boolean unconditional) {
// TODO Auto-generated method stub
}
public void commandAction (Command c, Displayable s)
{
if (c == exitCommand)
{
destroyApp (false);
notifyDestroyed();
}
}
}