LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   install sun jdk for freenet (http://www.linuxquestions.org/questions/linux-software-2/install-sun-jdk-for-freenet-855249/)

jonnie 01-09-2011 07:23 PM

install sun jdk for freenet
 
Hello,
I wanted to try freenet but it says it doesn't like the openjdk java which is by default installed with fedora.
I should get the sun jdk instead. How can I install that?
After browsing a while I downloaded a self-extracting jdk-6u23-linux-i586-rpm.bin file, which extracted + installed some rpm's. But freenet still says it's using openjdk.
- How can I see which java versions are installed on my fedora? (possibly multiple)
- How can I see which jvm is the default one? (should be still openjdk in my case)
- How can I change the default jvm so it uses the one I just installed?
Cheers & Thanks in advance

knudfl 01-10-2011 04:16 AM

Setting up a new java :

1) su
2)
/usr/sbin/alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_23/bin/java 2

3) /usr/sbin/alternatives --config java
.. and then select the "sun" version.
4) exit

The command for version check : java -version
.. Should reply : java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23...
..

jonnie 01-10-2011 01:20 PM

Perfect, thanks! :)
Working great, freenet doesn't complain any more at all.

Seems this "alternatives" works like a version switch for arbitrary programs...
One more question, though. "alternatives" also had a lot of so-called slave-links installed for the openjdk version. However, it did't register any for my added sun version. Should I worry about that? Can it be that some things don't work properly because these links are missing?

Here's the output of alternatives --display java. Never mind the language (it's Swedish) but you can see the impressing list of null-values for my sun-java anyway:
Code:

java - statusen är automatisk.
 länk pekar för tillfället på /usr/lib/jvm/jre-1.6.0-openjdk/bin/java
/usr/lib/jvm/jre-1.6.0-openjdk/bin/java - prioritet 16000
 slav javaws: /usr/lib/jvm/jre-1.6.0-openjdk/bin/javaws
 slav keytool: /usr/lib/jvm/jre-1.6.0-openjdk/bin/keytool
 slav orbd: /usr/lib/jvm/jre-1.6.0-openjdk/bin/orbd
 slav pack200: /usr/lib/jvm/jre-1.6.0-openjdk/bin/pack200
 slav rmid: /usr/lib/jvm/jre-1.6.0-openjdk/bin/rmid
 slav rmiregistry: /usr/lib/jvm/jre-1.6.0-openjdk/bin/rmiregistry
 slav servertool: /usr/lib/jvm/jre-1.6.0-openjdk/bin/servertool
 slav tnameserv: /usr/lib/jvm/jre-1.6.0-openjdk/bin/tnameserv
 slav unpack200: /usr/lib/jvm/jre-1.6.0-openjdk/bin/unpack200
 slav jre_exports: /usr/lib/jvm-exports/jre-1.6.0-openjdk
 slav jre: /usr/lib/jvm/jre-1.6.0-openjdk
 slav java.1.gz: /usr/share/man/man1/java-java-1.6.0-openjdk.1.gz
 slav javaws.1.gz: /usr/share/man/man1/javaws-java-1.6.0-openjdk.1.gz
 slav keytool.1.gz: /usr/share/man/man1/keytool-java-1.6.0-openjdk.1.gz
 slav orbd.1.gz: /usr/share/man/man1/orbd-java-1.6.0-openjdk.1.gz
 slav pack200.1.gz: /usr/share/man/man1/pack200-java-1.6.0-openjdk.1.gz
 slav rmid.1.gz: /usr/share/man/man1/rmid-java-1.6.0-openjdk.1.gz
 slav rmiregistry.1.gz: /usr/share/man/man1/rmiregistry-java-1.6.0-openjdk.1.gz
 slav servertool.1.gz: /usr/share/man/man1/servertool-java-1.6.0-openjdk.1.gz
 slav tnameserv.1.gz: /usr/share/man/man1/tnameserv-java-1.6.0-openjdk.1.gz
 slav unpack200.1.gz: /usr/share/man/man1/unpack200-java-1.6.0-openjdk.1.gz
/usr/lib/jvm/jre-1.5.0-gcj/bin/java - prioritet 1500
 slav javaws: (null)
 slav keytool: /usr/lib/jvm/jre-1.5.0-gcj/bin/keytool
 slav orbd: (null)
 slav pack200: (null)
 slav rmid: (null)
 slav rmiregistry: /usr/lib/jvm/jre-1.5.0-gcj/bin/rmiregistry
 slav servertool: (null)
 slav tnameserv: (null)
 slav unpack200: (null)
 slav jre_exports: /usr/lib/jvm-exports/jre-1.5.0-gcj
 slav jre: /usr/lib/jvm/jre-1.5.0-gcj
 slav java.1.gz: (null)
 slav javaws.1.gz: (null)
 slav keytool.1.gz: (null)
 slav orbd.1.gz: (null)
 slav pack200.1.gz: (null)
 slav rmid.1.gz: (null)
 slav rmiregistry.1.gz: (null)
 slav servertool.1.gz: (null)
 slav tnameserv.1.gz: (null)
 slav unpack200.1.gz: (null)
/usr/java/jdk1.6.0_23/bin/java - prioritet 2
 slav javaws: (null)
 slav keytool: (null)
 slav orbd: (null)
 slav pack200: (null)
 slav rmid: (null)
 slav rmiregistry: (null)
 slav servertool: (null)
 slav tnameserv: (null)
 slav unpack200: (null)
 slav jre_exports: (null)
 slav jre: (null)
 slav java.1.gz: (null)
 slav javaws.1.gz: (null)
 slav keytool.1.gz: (null)
 slav orbd.1.gz: (null)
 slav pack200.1.gz: (null)
 slav rmid.1.gz: (null)
 slav rmiregistry.1.gz: (null)
 slav servertool.1.gz: (null)
 slav tnameserv.1.gz: (null)
 slav unpack200.1.gz: (null)
Den för tillfället "bästa" versionen är /usr/lib/jvm/jre-1.6.0-openjdk/bin/java.


knudfl 01-10-2011 01:56 PM

Quote:

Never mind the language (it's Swedish)
Everybody understand Swedish, don't they ? .. :)

Quote:

Can it be that some things don't work properly because these links are missing ?
If 'java -version' and 'javac -version' show the right answer :
Nothing to worry about.

..


All times are GMT -5. The time now is 06:49 PM.