本文介绍了错误的ELF类:ELFCLASS32的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Solaris计算机上运行我的应用程序时,我收到此错误指向某个.so文件。但是,应用程序在我的Windows机器上运行得很好。如果我没有弄错,我的应用程序期望64位版本,但我在Solaris机器上只有32位版本的.so文件。有没有办法解决这个问题,所以它会使用32位版本?我知道它与字节码无关,但可能与JVM无关。我尝试使用-d32或-d64运行,但它没有效果。

I'm getting this error pointing to some .so file when running my application on a Solaris machine. However, the application runs just fine in my Windows machine. If I'm not mistaken, my application is expecting for the 64-bit version but I only have a 32-bit version of the .so file in the Solaris machine. Is there a way I can fix this so it will use the 32-bit version instead? I understand it has nothing to do with the bytecodes but probably with the JVM. I tried running using -d32 or -d64 but it has no effect.

更新:

这是确切错误:

Exception in thread "main" java.lang.UnsatisfiedLinkError: librvjs11.so: ld.so.1: java: fatal: librvjs11.so: wrong ELF class: ELFCLASS32<br>
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)<br>
    at java.lang.ClassLoader.loadLibrary0(Unknown Source)<br>
    at java.lang.ClassLoader.loadLibrary(Unknown Source)<br>
    at java.lang.Runtime.loadLibrary0(Unknown Source)<br>
    at java.lang.System.loadLibrary(Unknown Source)<br>

我已经更新了LD_LIBRARY_PATH,因此它包含了包含上述文件的目录。

I've already updated LD_LIBRARY_PATH so it includes the directory containing the file above.

推荐答案

基于,推断出JVM是一个64位进程。这是在Solaris中使用 pflags 命令确认的。

Based on the conversation in the other answer, it was inferred that the JVM was a 64-bit process. This was confirmed using the pflags command in Solaris.

显然 -d32 标志被忽略了。这是因为JVM可能是64位的,它无法在32位模式下运行。因此,解决方案可能是安装32位版本的JVM,并使用相同的。

Apparently the -d32 flag passed to the JVM was being ignored. This was due to the possibility of the JVM being a 64-bit one, which was incapable of operating in the 32-bit mode. The resolution might therefore be to install a 32-bit version of JVM, and use the same.

这篇关于错误的ELF类:ELFCLASS32的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 06:39