PDA

View Full Version : Java version selection



Saint Mike
22nd June 2008, 07:57 AM
Hey,

In FC9

Trying to get 32bit jre working in 64bit firefox with nspluginwrapper

all seems to be working fine o_O (amazed at how pressing random buttons gave results =D )

Just confirming, the following means im using /opt/jre1.6.0_06 as default and openjdk as... an alternative or something? is that how i should have it set?


[root@blackbox opt]# /usr/sbin/alternatives --config java

There are 4 programs which provide 'java'.

Selection Command
-----------------------------------------------
* 1 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
2 /usr/lib/jvm/jre-1.5.0-gcj/bin/java
3 /opt/jre1.6.0_04/bin/java
+ 4 /opt/jre1.6.0_06/bin/java

Im just confused as printing /usr/sbin/alternatives --display java

comes up with alot of 64bit stuff for openjdk which is just confusing me o_O


java - status is manual.
link currently points to /opt/jre1.6.0_06/bin/java
/usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java - priority 16000
slave javaws: /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/javaws
slave keytool: /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/keytool
slave orbd: /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/orbd

**some stuff**

Current `best' version is /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java.

Is it still using openjdk as default or my installed jre 1.6.06? or is mine set as alternatice, and is that how its meant to be

Also what is the 1.5 version in there? and anyone out there know if icetea would be a better option for me? having trouble finding info for fc9 :D

Saint Mike
22nd June 2008, 01:13 PM
Ok yup its using the right one n/m ;- )

So u can use 32bit java from sun in fc9 64bit, the 32bit java plugin works with 64bit firefox with the nswrapperplugin =D

alternative lets u change between multiple versions of the same thing, so one is set as main the others sit there doing nothing, i was thinking it was setting up a fallback or something incase of errors o_O yeah i think i was half asleep

Still not sure what jre-1.5.0-gcj is though o_O

Hlingler
22nd June 2008, 04:07 PM
In that first code box with the "--config java" results, the asterisk ("*") indicates the option that the alterantives software believes is "best" and would use if auto mode is selected, and the plus sign ("+") indicates the actual alternative in use (therefore, manual mode is in use, as shown in first line of second code box).

You could have deliberately manipulated those priorities by installing jre-1.6.0_06 as an alternative with priority, say, 16006 or 16600 or whatever, and so trumping the default jre-1.6.0-openjdk.x86_64 priority of 16000.

jre-1.5.0-gcj is an older open-source alternative. I don't think "Iced Tea" is available for F9 ? Not sure on that though....

V

Saint Mike
22nd June 2008, 05:32 PM
Thx for the reply Hlingler =D

thats what i ended up doing after reading what the commands did instead of blindly following guides hehe

It turns out the java vnc client i was connecting to was on 5800 insted of 5900 so the open source might have done the trick and saved the hassle anyway :)

sanjiyan
23rd July 2008, 11:32 PM
If you're working in a production environment where security is important, I would stay away from gcj.

Don't get me wrong; I'm all for open source, but I discovered that jarsigner for gcj is broken.

Another question that's related to java versions although this might be better suited to another forum. Does NetBeans on Linux default to using JAVA_HOME to find javac? I ask because I found one the Windows NB bundles includes the JDK but does it in a funky way so that if you have a server like Tomcat, it can't find it.

It also makes it a problem with some Linux non-Java admins since JAVA_HOME is not updated with /usr/sbin/alternatives.

And this is why I hate inconsistent java install dirs. Does it go in /usr/lib, /usr/local, or /usr/java? Depends on your install. gcj and other open source like /usr/lib, zip installs like /usr/local, and /usr/java is what Sun likes.

Sorry for ranting.

Jaguar07
11th November 2008, 02:48 AM
In that first code box with the "--config java" results, the asterisk ("*") indicates the option that the alterantives software believes is "best" and would use if auto mode is selected, and the plus sign ("+") indicates the actual alternative in use (therefore, manual mode is in use, as shown in first line of second code box).

You could have deliberately manipulated those priorities by installing jre-1.6.0_06 as an alternative with priority, say, 16006 or 16600 or whatever, and so trumping the default jre-1.6.0-openjdk.x86_64 priority of 16000.

jre-1.5.0-gcj is an older open-source alternative. I don't think "Iced Tea" is available for F9 ? Not sure on that though....

V

"Ice Tea" is available for F9 64bit Edition by default. If you "yum install java" Iced Tea is what you get.