FeaturesPluginsDocs & SupportCommunityPartners

NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Classnot found Exception

 
Post new topic   Reply to topic    NetBeans Forums -> Java ME Users
View previous topic :: View next topic  
Author Message
veeru.sagoi



Joined: 08 Apr 2009
Posts: 2
Location: Bangalore

PostPosted: Fri Apr 10, 2009 5:56 am    Post subject: Classnot found Exception Reply with quote

I m new to Netbeans and when i created a simple midlet named Login and src code is as follows..

import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;

/**
* @author veeru
*/
public class Login extends MIDlet implements CommandListener {
private Display display;
private Form form;
private TextField uname, pwd;
private Command login, Exit,Forgot,signup;
public boolean log = false;
private Alert alertSuccess;
private Alert alertFailure;

public Login(){
uname = new TextField("UserName ","",15,TextField.ANY);
pwd = new TextField("Password ","",10,TextField.ANY);
//image = new TextField("Image :","",20,TextField.ANY);
form = new Form("LOGIN PAGE");
Exit = new Command("Exit", Command.CANCEL, 2);
login = new Command("Login", Command.OK, 2);
signup = new Command("NewUser Signup", Command.OK, 2);
Forgot = new Command("Forgot UserName/Password", Command.OK, 2);
}

public void startApp() {
display = Display.getDisplay(this);
form.append(uname);
form.append(pwd);
form.addCommand(Forgot);
form.addCommand(signup);
//form.append(image);
form.addCommand(login);
form.addCommand(Exit);
form.setCommandListener(this);
display.setCurrent(form);
}

public void pauseApp() {
}

public void destroyApp(boolean unconditional) {
}

public void commandAction(Command c, Displayable d) {
throw new UnsupportedOperationException("Not supported yet.");
}
When i run this program. At first i got some preverifier error msg. So i compiled and ran the program,it wprked fine but when we select Login Midlet in Emulator i got this msg

Unable to create MIDlet MSN.Login
java.lang.ClassNotFoundException: MSN/Login
at com.sun.midp.midlet.MIDletState.createMIDlet(MIDletState.java:156)
at com.sun.midp.midlet.Selector.run(Selector.java:150)

Can anyone help me out..
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java ME Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB