Very nice HowTo, imdeemvp, but won't work with 64 bit firefox simply becuase Sun hasnt made a 64bit browser plugin.. yet. They have the 64bit runtime and sdk but they don't include the plugin. Instead i used
Blackdown Java-Linux which seems to work excellently. If anyone figures out how to make Flash work in 64bit firefox you would be my new hero.....
ftp://ftp.tux.org/pub/java/JDK-1.4.2/amd64/fcs
The one you need is
j2re-1.4.2-fcs-linux-amd64.bin.
You can get the sdk instead, if you want, but the download is slllloooowww and its almost three times the size.
Semi-quick How-To:
Disclaimer: I am actually running FC4Test3_64bit, but I would assume it would be pretty much identical in FC3 64bit, and FC4 when its released.
After downloading, su to root, extract rpm, and agree to the license like so:
Code:
$ chmod a+x j2re-1.4.2-fcs-linux-amd64.bin
$ sh j2re-1.4.2-fcs-linux-amd64.bin
When this is run it will create a directory called
j2re1.4.2 in the current directory. This does not use an rpm installer, it simply extracts out everything you need into that directory so it wiill need to be copied to a usable location. I recommend /usr/java since it should already exists on your system.
From the same location you extracted the .bin:
Code:
$ cp -r j2re1.4.2 /usr/java
Now for the plugin. The plugin directory for the version of firefox that is installed with FC4Test3 is /usr/lib64/firefox-1.0.4/plugins. If you want the plugin to work for Mozilla there are actually 3 mozilla directories under /usr/lib64: /mozilla, /mozilla-1.7.7, and /mozilla-1.7.8. All of which have plugin directories but since I dont use mozilla I havent messed with them to see which one (maybe all of them) need the plugin link.
To create the link for Firefox:
Code:
ln -s /usr/java/j2re1.4.2/plugin/amd64/mozilla/libjavaplugin_oji.so /usr/lib64/firefox-1.0.4/plugins/libjavaplugin_oji.so
Viola.. that should be it. Open up firefox and type
about:plugins and you should now see a large section under
Java(TM) Plug-in Blackdown-1.4.2 and you can test it out
here.
You may also want to use this for actual java applications as well. If you were to run java right now you would be using the default in FC which is gij, an interpreter for Java bytecode. The easiest way to fix this is to use
alternatives since the java link in /usr/bin is already setup to it.
Tell alternatives about the new installation of java:
Code:
$ alternatives --install /usr/bin/java java /usr/java/j2re1.4.2/bin/java 2
$ alternatives --config java
And you will see:
Code:
There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
* 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
2 /usr/java/j2re1.4.2/bin/java
Enter to keep the current selection[+], or type selection number: 2
Enter "2" to choose to reassociate the link to the blackdown j2re1.4.2 we just installed. You can then type
which java or
java -version if you want, it should read:
Code:
Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.2)
Java HotSpot(TM) 64-Bit Server VM (build Blackdown-1.4.2-fcs, mixed mode)
Not quite done yet. Dust off your favorite editor your going to need it briefly. I use nano, but substitute anything your confortable with.
Code:
nano /etc/profile.d/java64.sh
there are only 2 lines that needs to be in here that sets the java home path and then adds it to your path environment variable everytime you boot:
Code:
export J2RE_HOME=/usr/java/j2re1.4.2
export PATH=$PATH:/$J2RE_HOME/bin
Save the changes and exit the editor and type the following to make the script executable:
Code:
chmod +x /etc/profile.d/java64.sh
Last step: we need to make make those variables immediately available:
Code:
source /etc/profile.d/java64.sh
You should theoretically have a complete installation of the Java2 Runtime Environment both for standalone java applications and as a firefox plugin. If I forgot anything or got something wrong please let me know :)