TheMapIsNotTheTerritory on mapping reality subsets



HowTo: Install Sun Java 6 JDK on Strato-V-Power-Server with Ubuntu 8.04 LTS

01 Jan 2009
Posted by christian

The apt sources of the default Ubuntu 8.04 installation of the Strato V-power servers are not set to multiverse. So when you want to install the sun-java packages, you have to add multiverse.

For this just do the following:

vi /etc/apt/sources.list

and add the string "multiverse" at the end of every 'deb' line.
The result should look like this:

# See sources.list(5) for more information, especialy
# Remember that you can only use http, ftp or file URIs
# CDROMs are managed through the apt-cdrom tool.

deb ftp://ftp.stratoserver.net/pub/linux/ubuntu hardy main restricted universe multiverse
deb-src ftp://ftp.stratoserver.net/pub/linux/ubuntu hardy main restricted universe multiverse

deb ftp://ftp.stratoserver.net/pub/linux/ubuntu hardy-updates main restricted universe multiverse
deb-src ftp://ftp.stratoserver.net/pub/linux/ubuntu hardy-updates main restricted universe multiverse

deb ftp://ftp.stratoserver.net/pub/linux/ubuntu hardy-security main restricted universe multiverse
deb-src ftp://ftp.stratoserver.net/pub/linux/ubuntu hardy-security main restricted universe multiverse

Then do the following commands:

apt-get update


apt-get install sun-java6-jdk

In my case there was the following error:

#
# An unexpected error has been detected by Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0xb7e5f8e3, pid=30320, tid=3084712848
#
# Java VM: Java HotSpot(TM) Client VM (10.0-b23 interpreted mode linux-x86)
# Problematic frame:
# C [libc.so.6+0x698e3] cfree+0x73
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#

followed by some cryptic vm arguments and:


--------------- P R O C E S S ---------------

Java Threads: ( => current thread )

Other Threads:

=>0x08be2800 (exited) Thread [stack: 0xb7d80000,0xb7dd0000] [id=30321]

VM state:not at safepoint (not fully initialized)

VM Mutex/Monitor currently owned by a thread: None

and this:

VM Arguments:
jvm_args: -Xshare:dump -Xmx2m -XX:PermSize=128m
java_command:
Launcher Type: SUN_STANDARD

Environment Variables:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
LD_LIBRARY_PATH=/usr/lib/jvm/java-6-sun-1.6.0.07/jre/lib/i386/client:/usr/lib/jvm/java-6-sun-1.6.0.07/jre/lib/i386:/usr/lib/jvm/java-6-sun-1.6.0.07/jre/../lib/i386
SHELL=/bin/bash

And in the end this:


--------------- S Y S T E M ---------------

OS:lenny/sid

uname:Linux 2.6.18-028stab059.3 #1 SMP Wed Oct 15 12:01:16 MSD 2008 i686
libc:glibc 2.7 NPTL 2.7
rlimit: STACK 10240k, CORE 0k, NPROC 16375, NOFILE 1024, AS infinity
load average:0.19 0.05 0.01

CPU:total 2 (1 cores per cpu, 2 threads per core) family 15 model 2 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, ht

Memory: 4k page, physical 5140812k(5048016k free), swap 0k(0k free)

vm_info: Java HotSpot(TM) Client VM (10.0-b23) for linux-x86 JRE (1.6.0_07-b06), built on Jun 10 2008 01:33:02 by "java_re" with gcc 3.2.1-7a (J2SE release)

time: Sat Dec 6 12:52:48 2008
elapsed time: 0 seconds

After I typed this:


/# update-alternatives --config java
---
Es gibt 3 Alternativen, die »java« bereitstellen.

Auswahl Alternative
-----------------------------------------------
1 /usr/bin/gij-4.2
*+ 2 /usr/lib/jvm/java-gcj/jre/bin/java
3 /usr/lib/jvm/java-6-sun/jre/bin/java

Drücken Sie die Eingabetaste, um die Vorgabe[*] beizubehalten,
oder geben Sie die Auswahlnummer ein: 3

I choosed 3 as you can see, and it gave me the following message:


Verwende »/usr/lib/jvm/java-6-sun/jre/bin/java«, um »java« bereitzustellen.

Now I typed:

java -version

And I got:

java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode)

So it seems that everything is runnig as it should, even If there was an error message after the installation.

Thanks

Thank you for the great summary. Works as expected.

Martin.