Skip to main content

lwuit in j2me cldc application show error class java.lang .classnofounddefination

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
Bhavdip
Offline
Joined: 2011-03-31

hi i am new in lwuit
i am using lwuit with j2me when i deploy it on device it show me error internalapplication java.lang.classnofounddef
error like :
internal application error occured java.lang.noclassdeffouderror:java/lang/unsupported operation

Below code is my main middlet of my project when is deploy in my mobile device is through error internalapplication error :java.lang.classnofounddef
[CODE START]

package com.app.me;

import com.sun.lwuit.events.ActionEvent;
import com.sun.lwuit.plaf.UIManager;
import com.sun.lwuit.util.Resources;
import javax.microedition.midlet.*;
import com.sun.lwuit.*;
import com.sun.lwuit.events.ActionListener;

/**
* @author
*/
public class MainMiddlet extends MIDlet implements ActionListener{

public void startApp() {
try {

Display.init(this);
Resources theme = Resources.open("/Theme.res");
UIManager.getInstance().setThemeProps(theme.getTheme(theme.getThemeResourceNames()[0]));

// Display.getInstance().callSerially(new Runnable() {
// public void run() {
// setMainForm();
// }
// });
setMainForm();

} catch (Exception e) {

e.printStackTrace();

}
}
public void setMainForm(){

new MainScreen(this).show(); //this my new form which called
}

public void pauseApp() {
}

public void destroyApp(boolean unconditional) {

}

public void actionPerformed(ActionEvent ae) {
destroyApp(true);
notifyDestroyed();
}
public void exitMiddlet(ActionEvent ae){
actionPerformed(ae);
}
}

[/code end ]

please help me....

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vprise
Offline
Joined: 2003-11-07