Getting Java to work in Firefox 3.6 in FreeBSD or PC-BSD 8.2

Firefox 3.6 no longer works with the Java versions in PBIs. Instead the OpenJDK6 must be installed. However, as of writing this document there is not a PBI for OpenJDK6, so we must install it from the ports jail.

  1. Install ports on your system as follows: How to install ports on FreeBSD?
  2. Open the command prompt.
  3. su to root.
    $ su
    Password:
    #
  4. As root, get the latest ports.# portsnap fetch extract
  5. Install openjdk6.Note: There is an openjdk7 but it didn’t appear to have a web option yet, so hold off until it has one, use openjdk6.
    #
    #
    cd /usr/ports/java/openjdk6
    make WITH_WEB=yes BATCH=yes install
  6. Run this link command to link the library for the java plugin to your plugins directory.
    # ln -s /usr/local/openjdk6/jre/lib/IcedTeaPlugin.so ~/.mozilla/plugins/IcedTeaPlugin.so

Testing the Java plugin

You may want to verify that java is working in your Firefox install. You want to know two things:

  1. Is the plugin detected by Firefox?
  2. Does a java application work?
      1. Open Firefox. If Firefox is open already, close it, and re-open it.
      2. In the URL enter: about:pluginsYou should now see the IcedTea-Web Plugin (using IcedTea-Web 1.0.1).
      3. In Firefox, go to the following URL:
        http://www.java.com/en/download/testjava.jsp 
    1. Here are steps to make those two verifications. 

      Note; This is pretty much exactly like the handbook states.
      http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/desktop-browsers.html

Leave a Reply

How to post code in comments?