2

i am very new to j2me. i have created a sample program, but i am not able run that program. Build failed message came. My code is :

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

/**
 * @author aneesh
 */
public class httpconnection extends MIDlet  {
    private Command exit, start;
    private Display display;
    private Form form;
    public httpconnection () 
  {

  }
    public void startApp() {
    display = Display.getDisplay(this);
    exit = new Command("Exit", Command.EXIT, 1);
    start = new Command("Start", Command.EXIT, 1);
    form = new Form("Http Connection");
    form.addCommand(exit);
    form.addCommand(start);

    display.setCurrent(form);
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean unconditional) {
    }


}

and the error i am getting is

java.lang.UnsatisfiedLinkError: /usr/local/netbeans-7.0/mobility/WTK2.5.2/bin/sublime.so: /usr/local/netbeans-7.0/mobility/WTK2.5.2/bin/sublime.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1750)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1646)
    at java.lang.Runtime.load0(Runtime.java:787)
    at java.lang.System.load(System.java:1022)
    at com.sun.kvem.Sublime.<init>(Unknown Source)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
    at java.lang.Class.newInstance0(Class.java:372)
    at java.lang.Class.newInstance(Class.java:325)
    at com.sun.kvem.Lime.createLime(Unknown Source)
    at com.sun.kvem.KVMBridge.<init>(Unknown Source)
    at com.sun.kvem.KVMBridge.getBridge(Unknown Source)
    at com.sun.kvem.midp.MIDP.run(Unknown Source)
    at com.sun.kvem.environment.EmulatorInvoker.runEmulatorImpl(Unknown Source)
    at com.sun.kvem.environment.EmulatorInvoker.main(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at com.sun.kvem.environment.JVM.main(Unknown Source)
NetBeansProjects/VDCustomComponents1/nbproject/build-impl.xml:915: Execution failed with error code 1.
BUILD FAILED (total time: 3 seconds)
1
  • Probably a bug...can you try the same on netbeans windows version ? Commented Jun 22, 2011 at 6:41

1 Answer 1

3

It seems like you have 32-bit WTK and 64-bit JDK. You should install the matching 32-bit JDK and set the WTK to use it.

Command-line WTK installer downloaded from Sun (Oracle) website should ask you for the JDK location during installation.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.