Click here to register.

Frequently Asked Questions

Flat
64-bit Fedora 9 Sun Java FireFox Plugin Installation
User: kmaclean
Date: 8/25/2008 10:19 pm
Views: 1534
Rating: 3    Rate [

+

|

-

]

(alternate title #1: How-to install Sun Java on 64-bit Fedora 9 so that signed applets will work)

(alternate title #2: How-to install 32-bit FireFox on 64-bit Fedora 9 so that so that Sun Java applet will run properly in FireFox)

The information presented here was taken from these posts (many thanks to the authors: scott_glaser & natousayni):

Problem:

  • 64-bit Fedora 9 contains OpenJDK, which cannot run signed applets and the the VoxForge Speech Submission applet is a signed Java applet.
OpenJDK is the free implementation of Sun's Java run-time environment.  The browser plugin used in Fedora 9, gcjwebplugin, does not yet support signed plugins.  From the Fedora Project Wiki: :
    Handling Java Applets

Upstream OpenJDK does not provide a plugin. The Fedora OpenJDK packages include an adaptation of gcjwebplugin, that runs untrusted applets safely in a Web browser. The plugin is packaged as java-1.6.0-openjdk-plugin.
  •  ...
  • The gcjwebplugin adaptation does not support signed applets. Signed applets will run in untrusted mode. Experimental support for signed applets is present in the IcedTea repository, but it is not ready for deployment in Fedora.
  • The gcjwebplugin security policy may be too restrictive. To enable restricted applets, run the firefox -g command in a terminal window to see what is being restricted, and then grant the restricted permission in the /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/security/java.policy file.
  • Sun recommends 32-bit Java to run applets;
  • 32-bit Java needs a 32-bit plugin to work in a browser;
  • The 64-bit Fedora 9 implementation of FireFox is 64-bit and will not work with a 32-bit Java plugin.

Solution:

  • Install 32-bit FireFox

    * Add i386 Yum repository

        * create a new Yum configuration file:

        # gedit /etc/yum.repos.d/fedora-i386.repo

        * copy these settings into the new configuration file:

        [fedora-i386]
        name=Fedora $releasever - i386
        failovermethod=priority
        baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/i386/os/
        mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=i386
        enabled=1
        gpgcheck=1
        includepkgs=firefox
        gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
        #
        [updates-i386]
        name=Fedora $releasever - i386 - Updates
        failovermethod=priority
        baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/i386/
        mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=i386
        enabled=1
        gpgcheck=1
        includepkgs=firefox
        gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora

    *  Remove the default Firefox (64-bit) installation

    # yum -y erase firefox.x86_64

    *  Install 32-bit Firefox

    # yum -y install firefox.i386

  • Add libXtst.i386 library
    # yum -y install libXtst.i386
  • Don't touch your default java installation
Other how-tos state that you need to remove openjdk.  However, other programs on Fedora 9, like Eclipse, need the default Java.  You should not have to remove your default Java installation (java-1.6.0-openjdk java-1.0.6-openjdk-plugin) because you can use the alternatives command to select the version of Java you need (but you need to make sure you don't use the rpm version of Sun's Java install, because it changes the /usr/bin/java executable to not point to the "alternatives" command symbolic links ).
  • Create new Java directory
    # mkdir /usr/java

    # cd /usr/java   
  • Download Sun's java your new Java directory
    www.java.com/en/download
    (the .bin file NOT the rpm.bin - because the rpm changes the /usr/bin/java executable to not point to the "alternatives" command symbolic links).
  • Execute the bin

    # chmod +x jre*
    # ./jre-6u7-linux-i586.bin

  • Link FireFox plugins to the new Sun Java
    • Manually 
* for a particular user
    # cd /home/yourusername/.mozilla/plugins
    # ln-s /usr/java/jre-6u7-linux-i586/plugins/i386/ns7/libjavaplugin_oji.so 
* for all users:
    # cd /usr/lib/mozilla/plugins
    # ln-s /usr/java/jre-6u7-linux-i586/plugins/i386/ns7/libjavaplugin_oji.so 
- OR - 
(you can also use the alternatives command to set the plugin link - since FireFox is the only app that needs the Sun Java and it uses libjavaplugin.so rather than the libjavaplugin.so.x86_64 used by other programs (like Eclipse) on 64-bit Fedora 9).

    # /usr/sbin/alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /usr/java/jdk1.6.0_07/jre/plugin/i386/ns7/usr/java/libjavaplugin.so 2

    # /usr/sbin/alternatives --config libjavaplugin.so

  There is 1 program which provide 'libjavaplugin.so'.

  Selection    Command
-----------------------------------------------
*+ 1           /usr/java/jre1.6.0_07/plugin/i386/ns7/libjavaplugin_oji.so

Enter to keep the current selection[+], or type selection number: 1

 

 

Reply
PreviousNextAdd