Question

I have a CENTOS box * release 6.5 final * Kernel Linux 2.6.32-431.el6.x86_64 * GNOME 2.28.2 * Processor Intel Xeon * 64-bit

The 64-bit version of Java came included with the installation, as did Firefox.

I want to run a 32-bit Java application that I wrote, tested on Windows, on my CENTOS box, but am running into a problem.

I went to the java download page and downloaded the 32-bit RPM version of Java, jre-7u45-linux-i586.rpm. I installed the package by opening up a terminal window, doing a su and entering the root password, and installed the RPM package. The installation went without a hitch.

I tried executing "java -version" from a terminal window (regular user or su makes no difference) and received some sort of elf error, which led me to a stack overflow issue that said to execute from a su'ed terminal window "yum install glibc.i686". I did that, but am now running into:

Error Message

[root@sarah-linux Downloads]# /usr/java/jre1.7.0_45/bin/java -version
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

PATH

/usr/java/default/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/jmr/bin

CLASSPATH and JAVA_HOME

not defined

I also tried setting these two environment variables to

/usr/java/jre1.7.0_45/bin

but no dice, same problem.

Thoughts?

Était-ce utile?

La solution

Back out the RPM install of the 32 bit Java. You don't need it. You can run 32 bit compiled byte code in a 64bit JVM. Just can not do it the other way around.

Autres conseils

You need to set your jre class path.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top