1. Skip to Menu
  2. Skip to Content
  3. Skip to Footer>
Friday May 3rd     12:25 PM PDT                                  

Installing Firefox with Java plugin on FreeBSD

PDF Print E-mail

Written by Greg King Saturday, 21 August 2010 09:52

Mozilla's Firefox project is a robust, open source web browser.  It is flexible and easy to configure.  In this article we will explain how to install FIREFOX with Java support.  Note that our instructions are based on installing into a pre-existing GNOME environment on FreeBSD 8.1 release system.  We install Firefox before installing java because we need Firefox to help us get files we need



Installing FIREFOX 3.5 is easy.

# cd /usr/ports/www/firefox35

# make install clean


Unfortunately, installing Java is a little more difficult since the folks at Oracle have restrictively licensed JAVA to the FreeBSD foundation.  It will take a little effort and patience to install, but it is well worth it.  There are several ways to install JAVA into the FreeBSD system.  In our example we will focus on building a native Java Developer Kit (JDK) install.

Getting Java to install will require us to download some software from the web.  The easiest way to do this is by using LYNX.

# cd /usr/ports/www/lynx
# make install clean


When the options box comes up, we want SSL, Color support and Native Language support.

Now we need to ensure our system knows we installed lynx...

# rehash

I will save you alot of work here.  We will pre-download the software Java needs to have before it can install. 

# cd /usr/ports/distfiles

# lynx
http://www.java.net/download/jdk6/6u3/promoted/b05/jdk-6u3-fcs-src-b05-jrl-24_sep_2007.jar

# lynx http://www.java.net/download/jdk6/6u3/promoted/b05/jdk-6u3-fcs-bin-b05-jrl-24_sep_2007.jar


# lynx http://www.java.net/download/jdk6/6u3/promoted/b05/jdk-6u3-fcs-mozilla_headers-b05-unix-24_sep_2007.jar

.
The following assumes you are running the installation logged in as the root user.  If not, you will need to # chmod 775 /usr/ports/distfiles if the logged in user is in the wheel group, or # chmod 777 /usr/ports/distfiles if not.

Open Firefox and under EDIT, Preferences, MAIN, there is a space to tell the system where to save downloaded files.  Change this to /usr/ports/distfiles.  Don't forget to change it back to what it was when you finish installing everything.


When shown the configuration panel, turn off any reference to TZ Time Zone.   It is very version specific thus breaking this documentation.  You more than likely do not need it in any regard, so just disable it.

Browse to http://www.eyesbeyond.com/freebsddom/java/jdk16.html and download the bsd-jdk16-patches-4.tar.bz2 file.

Now browse to http://www.freebsdfoundation.org/cgi-bin/download?download=diablo-caffe-freebsd7-i386-1.6.0_07-b02.tar.bz2 , accept the license and download the file.

Got all of that?  Ok, now we are ready to install JAVA!


# cd /usr/ports/java/jdk16


# make install clean

The options screen will pop up.  You only need the WebStart and TZ options checked.

Once the install starts, you will have to accept the license by scrolling to the bottom and typing yes.  I had issues with this for a while because it does not echo anything back indicating it was starting the install.  I assumed it wasn't working and spent time troubleshooting.  One day, I went to the bathroom after typing yes, and when I came back I saw it was installing.  The lesson here is to be patient and know it will not do anything immediately after you type yes and hit enter.

Finally, we will actually install the java plugin for Firefox. 

First, we need to make a directory for our user.  Go to the user account you want to use for your desktop. (You will need to repeat this step for each Firefox user wanting to use the java plugin).

# su - <user>

% cd ~

% mkdir .mozilla/plugins

Now we will install the plugin as a symbolic link to the actual library used by Firefox.

% ln -s /usr/local/diablo-jdk1.6.0/jre/plugin/i386/ns7/libjavaplugin_oji.so ~/.mozilla/plugins/

Restart Firefox and in the location bar, type about:plugins .  You should see the java plugin installed.  Then go to http://www.phllonline.com ... after a few seconds, you should see a rotating java picture banner on that page.


  FreeBSD Goodies
eXTReMe Tracker
Content View Hits : 405075