java.lang.UnsatisfiedLinkError: /home/developer/apps_3.3_MyEclipse/WTK2.5.2/bin/sublime.so: /home/developer/apps_3.3_MyEclipse/WTK2.5.2/bin/sublime.so: wrong ELF class: ELFCLASS32
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.
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.
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)
经查询才知道WTK尚不能在64位jdk上运行,对于J2ME初学者可能困惑比较大。这时,需要安装一个32位的jdk,编辑WTK2.5.2/bin中的emulator文件,将
javapathtowtk=/usr/bin/X11/
更改为自己安装的新的32位jdk的路径,如下:
javapathtowtk=/home/developer/apps/jdk1.6.0_05_32/bin/
保存后重新运行wtk,一切正常。