I'm trying to run a simple midlet on Java ME SDK 3.0 integrated into Netbeans 7.1 on Windows 7 Ultimate (just a UI). It was running fine until yesterday but now its showing an error and i can't see the midlet in the emulator. I don't think its anything related to compatibility issues because the applications were running just fine the other day. Could someone help me rectify this glitch or whatever it is? (No error in program i guess)
import java.io.IOException;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.MIDlet;
public class Facebook extends MIDlet {
public void startApp() {
Form f = new Form("Facebook Login");
try {
Image g = Image.createImage("/Facebook 2.png");
ImageItem img = new ImageItem(null, g, Item.LAYOUT_CENTER, null, Item.PLAIN);
f.append(img);
} catch (IOException e) {
e.printStackTrace();
}
TextField tf = new TextField("Email or Phone", null, 300, TextField.ANY);
f.append(tf);
TextField tf1 = new TextField("Password", null, 300, TextField.ANY);
f.append(tf1);
ChoiceGroup cg = new ChoiceGroup(null, ChoiceGroup.MULTIPLE);
cg.append("Remember Me",null);
f.append(cg);
StringItem str = new StringItem(null, "Forgot Password?", StringItem.HYPERLINK);
f.append(str);
try {
Image g2 = Image.createImage("/Fb Login 2.png");
ImageItem img2 = new ImageItem(null, null, Item.LAYOUT_CENTER, null, Item.BUTTON);
f.append(img2);
} catch (IOException e2) {
e2.printStackTrace();
}
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
}
Message in output:
Starting emulator in execution mode * Error * Failed to connect to device 6! Reason: Failed to initialize connection with emulator 6! (possible runtime incompatibility) F:\NetBeansProjects\MobileApplication2\nbproject\build-impl.xml:782: Execution failed with error code 1. BUILD FAILED (total time: 12 seconds)