红联Linux门户
Linux帮助

Linux64位系统下WTK无法启动的问题解决办法

发布时间:2008-04-21 00:45:06来源:红联作者:Ziud
用的是suse的64位系统,jdk安装的也是64位的,在安装WTK2.5.2后,运行自带的例子死活不能通过,错误提示为:

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.(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.(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)

经查询才知道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,一切正常。
文章评论

共有 0 条评论