Skip to Main Content

How to fix class loading error: Abstract and native methods cannot have code

big_ottsFeb 22 2019 — edited Feb 23 2019

I am attempting to do some hello world type apps in Java ME in Netbeans 7.4 (because 8.0 gives me a million more errors when I run anything), however when I attempt to run my app it gives me the error Error preverifying class javax.microedition.midlet.MIDlet Class loading error: Abstract and native methods cannot have code
I'm not good at coding and I decided to try changing some classes to abstract without fully knowing what I was doing and whatnot, but that didn't work.

Here is the code

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

public class MyFirstApplication extends MIDlet {
private StringItem si;
private Form myform; 

public void startApp() {
si = new StringItem("hello","world");
myform = new Form("form");
myform.append(si); Display.getDisplay(this).setCurrent(myform);

public void pauseApp() {

public void destroyApp(boolean unconditional) {


Any help or tips is appreciated.

(P.S If you have see this post on any other forums, that is because I am trying to get this project fixed quickly, as I waited many days on Stack Overflow already and i'm getting bored and impatient. Please try not to get these posts confused)

Post Details
Added on Feb 22 2019