participate


Sun Java Wireless Toolkit - wrong ELF class error when trying to run the emulator [Locked]
This topic is locked
<<   Back to Forum  |   Give us Feedback
This topic has 7 replies on 1 page.
Moha_K
Posts:1
Registered: 9/17/07
wrong ELF class error when trying to run the emulator   
Sep 17, 2007 1:24 AM

 
Hello, I've downloaded and installed both the JDK 6 Update 2 (Linux 64) and WTK 2.5.1 as described in the website and everything seems to be fine. However, whenever I try to run an examples, I get the following error:

java.lang.UnsatisfiedLinkError: /home/myuser/WTK2.5.1/bin/sublime.so: /home/myuser/WTK2.5.1/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:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1005)
at com.sun.kvem.Sublime.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.kvem.environment.JVM.main(Unknown Source)

I'm running Fedora 7 x86_64
My Java environment is:
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_02-b05, mixed mode)

My jre is a 64-bit version but the ktoolbar seems to be compatible with 32-bit versions only. is there a way to fix this?

Any help is appreciated.
 
Mertins
Posts:1
Registered: 10/24/07
Re: wrong ELF class error when trying to run the emulator   
Oct 24, 2007 5:42 PM (reply 1 of 7)  (In reply to original post )

 
I'm using Fedora X86 too. I'm using vm java 64, but with
WTK I needed install java 32. So I stay with two vm's:

/usr/java/jdk1.6.0_03_32
/usr/java/jdk1.6.0_03_64 <- this is default vm

I edited the WTK2.5.2/bin/emulator and completed this line:

javapathtowtk=/usr/java/jdk1.6.0_02_32/bin/

And all worked with netbeans (maybe other files needed edit too, for work alone).

I wope this work for you!

(Sorry my english)
 
bobbybutch
Posts:6
Registered: 10/16/06
Re: wrong ELF class error when trying to run the emulator   
Feb 20, 2008 2:34 AM (reply 2 of 7)  (In reply to #1 )

 
Hi there,

I'm having the same problem when running the emulator. I've tried changing the emulator file as suggested but have had no luck! I'm using Ubuntu and the java version im using is

java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_03-b05, mixed mode)

I have the latest version of the WTK also. The error message I get is
ava.lang.UnsatisfiedLinkError: /home/john/Progs/WTK2.5.2/bin/sublime.so: /home/john/Progs/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:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1005)
at com.sun.kvem.Sublime.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.kvem.environment.JVM.main(Unknown Source)


Any help with this would be much appreciated!

John
 
Betlista
Posts:3
Registered: 10/10/06
Re: wrong ELF class error when trying to run the emulator   
Jul 14, 2008 4:12 PM (reply 3 of 7)  (In reply to #2 )

 
Hello there,

I had same problem.
My system is 64 bit Kubuntu 8.04 Hardy Heron.
When trying I used 64 bit Java 1.6.0 update 7.
I tried what Mertins suggested but that wasn't enough.

When you are installing (unpacking) WTK 2.5.2 it's asking for "Java interpreter directory". When I used 32 bit Java during installation I was able to run ktoolbar without error.

Betlista
 
smuwanga
Posts:7
Registered: 6/20/08
Re: wrong ELF class error when trying to run the emulator   
Aug 28, 2008 8:07 AM (reply 4 of 7)  (In reply to original post )

 
Hi People,
I have also tried setting the variables but the error persists.
Here it is.

java.lang.UnsatisfiedLinkError: /home/smuwanga/WTK2.5.1/bin/sublime.so: /home/smuwanga/WTK2.5.1/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:1778)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1674)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1005)
at com.sun.kvem.Sublime.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.kvem.environment.JVM.main(Unknown Source)

Am using SUSE 10.3, 64 bit.

What did I miss?

Regards,
Simon.
 
smuwanga
Posts:7
Registered: 6/20/08
Re: wrong ELF class error when trying to run the emulator   
Aug 29, 2008 9:06 PM (reply 5 of 7)  (In reply to #4 )

 
Hi All,

The WTK2.5.2 worked.

I used the WTK2.5.2.

I installed the jdk for 32 bit machines(this I got from the sun website).

I reset the $JAVA_HOME to the new jdk.
Re installed the WTK2.5.2
During the re-installation, I specified a new path for the java interpreter; there I put the directory to the bin folder of the new jdk.

Went on till the last step.

Afterwards, I tested the emulator and the stuff worked.

Many thanks for the ideas I got from this page!

Regards,
Simon.
 
don_mahantya
Posts:41
Registered: 7/29/03
Re: wrong ELF class error when trying to run the emulator   
Nov 13, 2009 2:51 AM (reply 6 of 7)  (In reply to #1 )

 
I was facing the same problem as well.

I use Netbeans 6.7.1 on openSUSE 11.1 64-bit and I would get the error whenever I tried to invoke the Java ME emulator.


All I did was edit the emulator script i.e.

$ vi /opt/netbeans/netbeans-6.7.1/mobility8/WTK2.5.2/bin/emulator

and I added the path to the 32-bit Java directory

javapathtowtk=/opt/java/jdk1.6.0_14-32bit/bin/

NOTE: Make sure to put 'bin/' at the end

Hope it helps.. works for me
 
DarrylBurke
Posts:16,744
Registered: 7/2/07
Re: wrong ELF class error when trying to run the emulator   
Nov 13, 2009 3:41 AM (reply 7 of 7)  (In reply to #6 )

 
don_mahantya, please don't post in threads that are long dead. When you have a question, start your own topic. Feel free to provide a link to an old post that may be relevant to your problem.

I'm locking this thread now.

db
 
This topic has 7 replies on 1 page.
Back to Forum
 
Read the Developer Forums Code of Conduct

Click to email this message Email this Topic

Edit this Topic
  
 
 
Forums Statistics
    Users Online : 28
  • Guests : 129

About Sun forums
  • Oracle Forums is a large collection of user generated discussions. It is here to help you ask questions, find answers, and participate in discussions.

    Check out our guide on Getting started with Oracle Forums for a full walkthrough of how to best leverage the benefits of this community.

Powered by Jive Forums