Clan x86

Technical (Development, Security, etc.) => Unix / Linux Discussion => Topic started by: rabbit on April 30, 2006, 05:17:36 PM

Title: Installing JDK 1.5.0 06
Post by: rabbit on April 30, 2006, 05:17:36 PM
Grr.
root@Paradise:/# rpm -i jdk-1_5_0_06-linux-i586.rpm
error: Failed dependencies:
        glibc >= 2.1.2-11 is needed by jdk-1.5.0_06-fcs
        sh-utils >= 2.0-1 is needed by jdk-1.5.0_06-fcs
        fileutils >= 4.0-8 is needed by jdk-1.5.0_06-fcs
        gawk >= 3.0.4-1 is needed by jdk-1.5.0_06-fcs
        textutils >= 2.0-2 is needed by jdk-1.5.0_06-fcs
        /bin/sh is needed by jdk-1.5.0_06-fcs
root@Paradise:/# gawk --version
GNU Awk 3.1.5
[...snip...]
I grabbed the glibc, gawk, and coreutils packages off of Slackware.com and installed them all.  I'm confused...
I ran the bin, errored the same as rpm -i'ing the rpm alone.  I used rpm2tgz on the rpm, and ran that.  I got no error, but I still get 1.5.0 04 from java --version.  Arr!  Help?
Title: Re: Installing JDK 1.5.0 06
Post by: Ergot on April 30, 2006, 06:15:15 PM
Don't get the rpm then? There's a slackware package for it in Extras. Umm it's probably still showing 1.5.0 04 because that RPM is putting it somewhere where you $PATH doesn't point.
Title: Re: Installing JDK 1.5.0 06
Post by: rabbit on April 30, 2006, 06:25:15 PM
Is Extras a section on java.sun.com?  If so, I can't find it...
Title: Re: Installing JDK 1.5.0 06
Post by: iago on April 30, 2006, 06:35:13 PM
Here is how I do it:

- Download the non-RPM Java package
- Extract it
- Move it to /usr/local/lib
- Make a link from /usr/local/lib/java2-1.5.7_05 (or whatever) to /usr/local/lib/java:
ln -s /usr/local/lib/java2-1.5.7_05 /usr/local/lib/java
- Make a link to the Java binaries in the bin direcotry
ln -s /usr/local/lib/java/bin/* /usr/local/bin

After that, it should work fine.  If you upgrade Java, you can just re-point the link. 
Title: Re: Installing JDK 1.5.0 06
Post by: rabbit on April 30, 2006, 06:53:40 PM
PLEH!!
spencer@Paradise:~$ java -version
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode)
spencer@Paradise:~$ /usr/java/jdk1.5.0_06/bin/java -version
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
spencer@Paradise:~$ /usr/bin/java -version
bash: /usr/bin/java: Too many levels of symbolic links


Evil.

[edit]
Yay, your solution works.  Thanks.
Title: Re: Installing JDK 1.5.0 06
Post by: Ergot on April 30, 2006, 07:03:54 PM
Or the lazy Ergot way: http://slackware.mirrors.easynews.com/linux/slackware/slackware-current/extra/jdk-1.5.0_06/