Java in Fedora 14 Is No Laugh(lin)ing Matter

12 12 2010

Fedora 14 has been out for a month now, and I’m just getting around to upgrading.  At least on my main machine, a 64-bit CPU, I was able to do the command line upgrade easily, not so on my backup machine with a 32-bit CPU.  So that meant downloading the install DVD and starting fresh on that box.

The Iced Tea open source implementation of Java that Fedora includes by default is getting better with each version, but is still not able to run some of the applets that I need, mainly older ones.  So I still needed to download and install Oracle’s (formerly Sun’s) official Java, and make symbolic links between the browser plugin in Java’s folder and Firefox’s plugin folder.  The instructions I provided after Fedora 12 came out still work for 64-bit environments, and I expected the ones at My Guides, which hasn’t done a Fedora post-install guide since F12, for 32-bit environments, to keep on working.

However, they don’t, and I spent a good chunk of this day trying to figure out why, while hearing the Rams get their asses handed to them in the background.  Turns out that while 32-bit Java still installs libjavaplugin_oji.so, which was the browser plugin in the past, it is no longer the browser plugin as of the current version of Java (1.6.0.23).  Turns out that libnpjp2.so is the browser plugin, as it is with 64-bit Java.  And you’ll find 32-bit libnpjp2.so in a different folder than libjavaplugin_oji.so in a 32-bit Java installation or even libnpjp2.so in a 64-bit installation.  But once I found it, I made the symbolic link between Firefox’s plugin folder and it, and everything worked.

So, for 32-bit environments, after you download the current Java version jre-6u23-linux-i586.bin from Oracle’s site, assuming your browser saves it to the default downloads directory, here are the commands:

su -
(your password)
cd /home/yourusername/Download/
mv jre-6u23-linux-i586.bin /opt
cd /opt/
chmod a+x jre-6u23-linux-i586.bin
./jre-6u23-linux-i586.bin
yum remove java-*-openjdk-plugin
ln -s /opt/jre1.6.0_23/lib/i386/libnpjp2.so /usr/lib/mozilla/plugins/libnpjp2.so

For 64-bit environments, the file name will be jre-6u23-linux-x64.bin:

su -
(your password)
cd /home/yourusername/Download
mv jre-6u23-linux-x64.bin /opt
cd /opt/
chmod a+x jre-6u23-linux-x64.bin
./jre-6u23-linux-x64.bin
yum remove java-*-openjdk-plugin
ln -s /opt/jre1.6.0_23/lib/amd64/libnpjp2.so /usr/lib64/mozilla/plugins/libnpjp2.so

As usual, you download the .bin file, NOT the .rpm.bin file from Oracle.  You’ll no longer have to assent to a EULA in the text installation routine inside the terminal, as a check box on Oracle’s download website serves the same purpose.  And when Java is updated, the only difference it should make in this routine is replacing all the “23″ numbers with “24″ or “25″ or “26″ or whatever.  Once you’re done, restart Firefox, then test the installation here, here and here.  Note that none of those work with Iced Tea, only with official Java.

***

In 32-bit F14, you can get Flash the old-fashioned way — Add the Adobe repository and do yum install flash-player.  In 64-bit F14, there is a high quality beta of 64-bit Flash 10.2 (“Square”), but no repository.  So you’ll download it here, and use the archive manager to unpack the single file zipped up inside there (libflashplayer.so) to the destination /usr/lib64/mozilla/plugins/

After all that, both Flash and Java should work in both Firefox and Google Chrome, and it shouldn’t matter if you install Chrome before or after you do all this.  As for Opera, I’m guessing Flash will work right away but you’d have to do Tools > Preferences > Advanced > Content (AFTER you un-fuck up the UI), then open the Java options box, then tell it to look for the plugin at /opt/jre1.6.0_23/lib/i386/ for 32-bit environments or /opt/jre1.6.0_23/lib/amd64/ for 64-bit environments.  But there is seriously something wrong with Opera in Linux in general, not just 32-bit or 64-bit browsers, not just in 32-bit or 64-bit Fedora, and not just in the Fedora distribution.  So I’m not going to bother with Opera in Linux for awhile.


Actions

Information

2 responses

11 03 2011
Java in Fedora 14 Is No Laugh(lin)ing Matter (via Countenance Blog) | cockybannana

[...] Fedora 14 has been out for a month now, and I'm just getting around to upgrading.  At least on my main machine, a 64-bit CPU, I was able to do the command line upgrade easily, not so on my backup machine with a 32-bit CPU.  So that meant downloading the install DVD and starting fresh on that box. The Iced Tea open source implementation of Java that Fedora includes by default is getting better with each version, but is still not able to run some o … Read More [...]

26 05 2011
A Fine Line Between Lovelock and Hate « Countenance Blog

[...] for Java, the only thing that has changed from my Fedora 14 instruction set is the version number of Java — We’re up to 1.6.0.25 right now.  So the commands [...]




Follow

Get every new post delivered to your Inbox.

Join 300 other followers