Showing posts with label Java 6. Show all posts
Showing posts with label Java 6. Show all posts

9 Jul 2008

Error running Java applications in Centos 5

When trying to run a Java application on my Centos VE I got this error message:


#
# An unexpected error has been detected by Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00002aaaaaab4112, pid=3715, tid=1075882304
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0_03-b05 mixed mode)
# Problematic frame:
# C [ld-linux-x86-64.so.2+0x9112]
#
# An error report file with more information is saved as hs_err_pid3715.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted


To solve this error, related with some libraries we use prelink.

If it is not already installed we can install it like this:
# yum install prelink

And then we run prelink:
# /usr/sbin/prelink -amR

Installing Java 6 in a Centos 5 VE

Download Java installation package from:
http://java.sun.com/javase/downloads/index.jsp

Select the version you want and click download.
Then you'll have to select the platform where java will be installed (Linux x64, for me) and check the licence agreement.

In the next page I select to download the "Linux x64 RPM in self-extracting file" and then the download starts using SUN's Download Manager.

With the package copied to the VE in which we want to install Java we must make it executable:

# chmod a+x jdk-6u3-linux-amd64-rpm.bin

And install it:

# ./jdk-6u3-linux-amd64-rpm.bin

Check that the right version is available now:

# java -version
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_03-b05, mixed mode)
#