Search code examples
java-melwuit

ResourceEditor LWUIT NoClassDefFoundError: com/app/XMLMidlet: com/sun/lwuit/events/ActionListener


I have developed Rss App LWUIT Project using ResourceEditor.

I opened the project in Netbeans IDE, I followed the link at developers Nokia site Generating the NetBeans project in the Resource Editor - Adding GUI resource file manually into your project.

While running my application, I am facing Uncaught exception

 java/lang/NoClassDefFoundError: com/app/XMLMidlet: com/sun/lwuit/events/ActionListener

Could I do any extra thing?


Solution

  • copy the res file to your package folder, then,

    Display.init(this);  
        try {
            Resources r = Resources.open("/resource.res");
    
            UIManager.getInstance().setThemeProps(r.getTheme(
                r.getThemeResourceNames()[0])
            );
        } catch (java.io.IOException e) {
        }