首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

求帮看看linux执行java class发生错误

2012-07-08 
求帮看看linux执行java class发生异常[root@cs1 /]# java com.magc.jni.HelloWorldException in thread m

求帮看看linux执行java class发生异常
[root@cs1 /]# java com.magc.jni.HelloWorld
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/cstor/libhello.so: /home/cstor/libhello.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:1807)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1703)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1003)
at com.magc.jni.HelloWorld.<clinit>(HelloWorld.java:5)
Could not find the main class: com.magc.jni.HelloWorld. Program will exit.
[root@cs1 /]# 

求给出原因 都是 linux64位 jdk 64位

[解决办法]
不要用linux,用windows
[解决办法]
还没见过这中问题。。。
[解决办法]
Could not find the main class: com.magc.jni.HelloWorld. Program will exit.

检查java_home classpath 或者在执行的命令里面指定执行的classpath

热点排行