Gentoo Wiki ArchivesGentoo Wiki

HOWTO_AMD64/java

Contents

Firefox and Java

As I edit this on 1 May 2008 a working full-featured 64 bit java browser plugin has only become available relatively recently. This is Icedtea and unless things have changed very recently it is still not available in portage. This and other options are set out below.

Firefox and Sun's OpenJDK/IcedTea JDK

Warning: Please note that this solution requires the use of portage overlays. It may also require an upgrade to gcc which can easily break your system. Please only attempt this if you are comfortable with your system and prepared to suffer the consequences if it breaks.

The Java overlay now contains ebuilds for both IcedTea6 (Java 1.6) and IcedTea (the forthcoming Java 1.7, which is not yet standardised). Unless you intend to do JDK development work, we suggest installing icedtea6.

IcedTea6 requires an existing JDK in order to build, so you first need to install gcj-jdk, also from the overlay. (Alternatively, you could temporarily install the binary, non-plugin-including version just to compile from; see next paragraph.) This depends on gcc 4.3.1 being built with the gcj USE flag. You don't have to have this selected as your default compiler, but it has to be installed as only this version of gcj supports the 1.5 language features of Java. Once gcj-jdk is installed, you can emerge icedtea6. For further information, please see the IcedTea wiki.

If you don't want the hassle of installing gcc 4.3.1, you can first emerge sun-jdk, then emerge icedtea6, then emerge -C sun-jdk. This will let you use the 64-bit binary version provided by Sun to compile your IcedTea. Note that this isn't as "pure" a method as above; while you end up with only locally-compiled software on your finished system, you used precompiled binaries to bootstrap.

Then make the new icedtea java the default 64 bit browser plugin: eselect java-nsplugin set 64bit icedtea6-1.2. That's it. You should now have a working amd64 java browser plugin.

Warning: Please note that all the solutions below require installing proprietary/non-Free software.

Firefox and Sun's Legacy Proprietary JDK

Unfortunately while Sun have now given us an amd64 edition of Java, it doesn't include Java Web Start or the Netscape-compatible plugin (which Firefox uses). And because the portage packages all install the 64-bit edition now, the 32-bit edition has to be installed manually.

emul-linux-x86-java-1.6 can be installed from portage for 32 bit support so please use this instead of manual method!

Updated Method Using emul-linux-x86-java-1.6

Make sure you have emerged the following packages:

NOTE: the mozilla-firefox-bin package will install the 32-bit version even if you are running a 64-bit system

NOTE: the emul-linux-x86-java package must have the nsplugin use flag enabled!

Code: Create symlink to Java nsplugin
mkdir -p /usr/lib64/nsbrowser/plugins 
cd /usr/lib64/nsbrowser/plugins/
ln -s /opt/emul-linux-x86-java-1.6.0.07/plugin/i386/ns7/libjavaplugin_oji.so . 

Temporary workaround for Firefox 3 RC3 and emul-linux-x86-java-1.6.0.07

Code: This tip from gerardo http://forums.gentoo.org/viewtopic-p-5098527.html#5098527
cd /opt/firefox/plugins
ln -s /opt/emul-linux-x86-java-1.6.0.07/plugin/i386/ns7/libjavaplugin_oji.so . 

Manual Method

Warning: The following method doesn't use packages from portage. This means that you will not be able to use emerge to manage its installation, upgrade or uninstallation. Gentoo does not support this method, and will not be able to assist users who decide to use it.

Go to http://java.com/en/download/linux_manual.jsp and download the self-extracting file (not the rpm). Make sure you download the 32-bit (i586) version of JRE.

Once downloaded, install Java by running: sh jre-1_5_0-linux-i586.bin

Follow the installation instructions to complete the installation of Java. Next, move the newly installed Java to under /opt (where all binary packages should go) with: mv jre1.5.0_06 /opt/sun-jre-bin-1.5.0.06-i586

Now create a symlink in a directory that will be searched by browsers looking for Netscape-compatible plugins:

Code: Create symlink to Java nsplugin
mkdir -p /usr/lib32/nsbrowser/plugins
cd /usr/lib32/nsbrowser/plugins/
ln -s /opt/sun-jre-bin-1.5.0.06-i586/plugin/i386/ns7/libjavaplugin_oji.so .

Firefox and Blackdown JDK

Warning: Blackdown Java plugin has not functioned properly on AMD64 for some time. The use flag to build the plugin has been disabled, apparently due to security issues, and simply specifying it in make.conf or on the command line does not work. It is still possible to enable the use flag and build the plugin, but in my experience it crashed continually and was unusable. Given the security issues, I do not propose to set out how to enable the building of the plugin here. This information is readily available by a simple search. If you must, once installed, the old instructions to make it work with firefox are set out below.

Check that you have dev-java/blackdown-jdk installed and that it was built with the nsplugin use flag. Then create a symlink so Firefox will find the plugin:

ln -s /opt/blackdown-jdk-YOURVERSIONHERE/jre/plugin/amd64/mozilla/libjavaplugin_oji.so /usr/lib/mozilla-firefox/plugins/libjavaplugin_oji.so

Retrieved from "http://www.gentoo-wiki.info/HOWTO_AMD64/java"

Last modified: Tue, 30 Sep 2008 13:35:00 +1000 Hits: 14,459

Created by NickStallman.net, Luxury Homes Australia
Real estate agents should list their apartments, townhouses and units in Australia.