Personal tools
You are here: Home Fedora 64 Bit Desktop 64 Posts Blackdown Java Installation x86_64

Blackdown Java Installation x86_64

by scott_glaser last modified Jan 30, 2008 02:30 AM
— filed under: ,

For many of us that run Fedora Core x86_64, there is no option for a 64 bit version of Java, there are many us that do not want to degrade the performance of our Installation by downgrading to the x86 version of Firefox. The people at Blackdown.Org have created a 64 bit version of Java for us, here is a "down and dirty" installation without having to rebuild any packages. Steps 1 - 7 cover the basic plugin for Mozilla and Firefox. Steps 8 - 17 cover the requirements for programs that require Java, such as Limewire.

Applicable to Fedora Versions

  • Fedora Core 5+

Requirements

  1. Fedora Core x86_64 Installation
  2. Mozilla x86_64 Installed
  3. Firefox x86_64 Installed

Doing the work

  1. Download the JRE-1.4.2-03 bin here: (ftp://mirrors.ibiblio.org/pub/mirrors/blackdown/JDK-1.4.2/amd64/03/ ).

  2. Get the file "j2re-1.4.2-03-linux-amd64.bin"

  3. Once the file is downlaoded, Open a terminal .
  4. Login as root by entering the following.

    su -
  5. Now change to the directory /opt.

    cd /opt
  6. Execute the binary installation for JRE in the /opt directory (ensure that you use the path to the downloaded file i.e. /home/sglaser/downloads).

    sh /home/sglaser/downloads/j2re-1.4.2-03-linux-amd64.bin 

    After executing this command you will need to read through the License Agreement and type yes for the installer to actually start installing the software. Once installed it will create a folder "j2re1.4.2" in the /opt directory.

  7. Now, to install the plug-in, execute the following command.

    ln -s /opt/j2re1.4.2/plugin/amd64/mozilla/libjavaplugin_oji.so /usr/lib64/mozilla/plugins/libjavaplugin_oji.so
  8. Close all instances of Firefox and restart for the plug-in to function properly. Note: It has to be a symbolic link, copying libjavaplugin_oji.so will NOT work.

  9. Create a java.sh script by entering the following, ensure you press enter after each line of text entered.

    cat <<EOF>> /etc/profile.d/java.sh
    export JAVA_HOME=/opt/j2re1.4.2
    export PATH=\$JAVA_HOME/bin:\$PATH
    EOF
  10. In the terminal (which should still be open) type. NOTE: THIS STEP MUST BE EXECUTED AS ROOT, SEE STEP 5. IF EXECUTED VIA SUDO IT WILL CORRUPT YOUR PATH STATEMENT.

    source /etc/profile.d/java.sh
  11. Hit enter, then type the following:

    /usr/sbin/alternatives --install /usr/bin/java java /opt/j2re1.4.2/bin/java 2
  12. Hit enter, then type the following:

    /usr/sbin/alternatives --config java
  13. Hit enter, Then the following text should be displayed:

    There are 2 programs which provide 'java'.
    Selection Command
    -----------------------------------------------
    *+ 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
    2 /opt/j2re1.4.2/bin/java
    Enter to keep the current selection[+], or type selection number:
  14. Type:

    2   
  15. Hit enter, then type the folllowing:

    /usr/sbin/alternatives --display java
  16. Hit enter, then a line similar to the following should be displayed:

    java - status is manual.  
    link currently points to /opt/j2re1.4.2/bin/java
    /usr/lib/jvm/jre-1.4.2-gcj/bin/java - priority 1420
    slave rmiregistry: /usr/lib/jvm/jre-1.4.2-gcj/bin/rmiregistry
    slave jre_exports: /usr/lib/jvm-exports/jre-1.4.2-gcj
    slave jre: /usr/lib/jvm/jre-1.4.2-gcj
    /opt/j2re1.4.2/bin/java - priority 2
    slave rmiregistry: (null)
    slave jre_exports: (null)
    slave jre: (null)
    Current `best' version is /usr/lib/jvm/jre-1.4.2-gcj/bin/java.
  17. Close all instances of Firefox and restart for the plug-in to function properly.

  18. You should now be able to install and run Java applications.

Troubleshooting

How to test

Test you plugin HERE! (http://www.java.com/en/download/help/testvm.xml ) If everything went well you should see a grey box with a little dancing java logo and above the logo should be your java information.

Common problems and fixes

If JAVA applications do not run after restarting firefox, you may need to check your /var/log/audit/audit.log. If you see messages similar to the following "type=AVC msg=audit(1144977424.506:73): avc: denied { execmod } for pid=3005 comm="java_vm" name="libdeploy.so" dev=dm-0 ino=3274482 scontext=user_u:system_r:unconfined_t:s0 tcontext=system_u:object_r:lib_t:s0 tclass=file" you may need to fix the SELINUX context by doing the following as root:

chcon -t textrel_shlib_t /opt/j2re1.4.2/lib/x86_64/libdeploy.so

More Information

Disclaimer

We test this stuff on our own machines, really we do. But you may run into problems, if you do, come to #fedora on irc.freenode.net

Added Reading

Document Actions
Log in


Forgot your password?
New user?