FreeBSD, Firefox 3.6, and Java…

I had a real hard time figuring this out, as the FreeBSD handbook is once again out of date on this subject.  so I’ll list the steps I followed to get Firefox working and to get java to run on it (still not 100% on the working java thing, but I found plenty of things to try!)


Firefox 3.6


easy as pie, follow these steps and hope you don’t have any problems (I did not)

  1. cd /usr/ports/www/firefox3
  2. sudo make install clean

done, worked like a charm, happy to oblige.


now… on to java (at this point still not working), quite a few more steps here and whatever file you find in your ports tree is not going to work, so just ignore it.



  1. cd /usr/ports/java/javavmwrapper
  2. sudo make install clean
  3. now open a web browser (I had to do this on another machine, then ftp it to my FreeBSD box, as seamonkey crashes everytime I start it and lynx downloaded the webpage the file is on and not the file, could be an issue between the keyboard and the chair however…) and travel the world wide web until you reach:
  4. find the correct version for your system and download it, I used:
    Diablo Latte JRE 1.6.0-7 FreeBSD 7.x/amd64 End-User 26M diablo-jre-freebsd7.amd64.
  5. click the link, ok the agreement, then DL (lynx just DL’d the page when I told it to follow the link, not sure what I did wrong, but I went around the issue instead of resolving it).  (oh and a side note, if you frequently end up at websites to get text based information and do not want java and flash scripts and embedded object killing your inet speed, locking up your processes, or just don’t want to see or have others see the images that may appear on the screen, use lynx as your www browser, it works great… most of the time.)
  6. now you can put the java file where you want, I ended up placing mine in /usr/ports/distfiles/diablosimply because the diablo port that was already on my system told me to go DL it and put it in /usr/ports/distfiles. from here on I will reference that dir, keep that in mind if you put it somewhere else.
  7. if you are not already there, cd /usr/ports/distfiles/diablo
  8. make config-recursive install clean
  9. now you should get this as your output (the version numbers may change if you do this farther into the future when new versions of things are available):
    pkg_add: warning: package ‘diablo-jdk-’ requires ‘xtrans-1.0.4’, but ‘xtrans-1.2.3’ is installed
    pkg_add: warning: package ‘diablo-jdk-’ requires ‘xproto-7.0.10_1’, but ‘xproto-7.0.15’ is installed
    pkg_add: warning: package ‘diablo-jdk-’ requires ‘xextproto-7.0.2’, but ‘xextproto-7.0.5’ is installed
  10. sudo pkgdb -F (resolved the dependency issue from step #9 immediately)
  11. sudo ln -s /usr/local/diablo-jre1.6.0/lib/ /usr/local/lib/firefox3/plugins (makes a symbolic link between the plugin file and the Firefox directory for plugins, basically up to this point you have installed java for FreeBSD, now we are setting it up to work in Firefox.  A user on a forum has made the conclusion that konqueror does not require this step and can call java itself if it has been installed correctly.  note if you don’t go read that post, you do have to set the path to java in konqueror or setting a JAVA_HOME environmental variable.) 
  12.  sudo ln -s /usr/local/diablo-jre1.6.0/lib/amd64/ns7/ /usr/local/lib/browser_plugins/symlinks/gecko18/
  13. sudo ln -s /usr/local/diablo-jre1.6.0/lib/amd64/ns7/ /usr/local/lib/browser_plugins/symlinks/gecko19/
  14. sudo ln -s /usr/local/diablo-jre1.6.0/lib/amd64/ns7/ /usr/local/lib/browser_plugins/
  15. ln -s /usr/local/diablo-jre1.6.0/lib/amd64/ns7/ ~/.mozilla/firefox/plugins/ (sudo not needed because this is being put in your home directory)
    I found all these locations (in 11 – 15) by doing a “sudo find / -name” as this plugin does show up in Firefox, but java still does not.
  16. so I checked my links, and sure enough all of the links looked like this:
    lrwxr-xr-x   1 root  wheel     20 Mar 31 09:37 -> so I did
    a.  sudo rm 
    b. sudo ln -s /usr/local/diablo-jre1.6.0/lib/amd64/ns7/ ./
    in each directory that had the bad link
  17. so, from a FreeBSD forum post I found this information: try running “sudo /usr/local/diablo-jre1.6.0/bin/jcontrol” which would not run via ssh, or the “F2” command line in KDE4, could not open it from Dolphin, nor from a local console (ttyv2). both the local console and ssh terminal give the same error: Error occurred during initialization of VM
    Unable to load ZIP library: /usr/local/diablo-jre1.6.0/lib/amd64/
    I have verified it is there and is owned by root.

Now this page has a very interesting piece of information dated feb 3rd 2010…


this may have something to do with why the FreeBSD ports have Firefox, Firefox3, and Firefox 35. 


so, I’m off to see if 3.5 and 3.6 can co-exist… one last note before I head off, I read on one of these forums that if you do everything else before installing Firefox, then run sudo make config-recursive install cleanone of the option in the config with be to enable java or some such, so we will see what happends…


after running sudo make config-recursive command in the /usr/ports/www/firefox directory I figured out exactly why to use the -recursive part… it runs the config option on ALL dependencies also. (oh and fyi I saw nothing about java in any of them…)


A couple of sites I visited while writing this up…

FreeBSD wiki – great site, except most of the pages were dated 2007

Lioks‘ FreeBSD tutorials & tips for beginners

The FreeBSD freshports page, which also shows “that very interesting piece of information”

A message poston a Unix forum about getting Firefox to work on FreeBSD, it’s for FreeBSD 5.3 but was a slightly amusing post, so I am linking it here anyway.

And finally the search I used to find them


Ok boys and girls, off to uninstall my Firefox 3.6.2 and to install Firefox 3.5, see you next time!


One thought on “FreeBSD, Firefox 3.6, and Java…

Leave a Reply

2 visitors online now
0 guests, 2 bots, 0 members
Max visitors today: 7 at 08:09 am UTC
This month: 26 at 09-21-2021 06:44 am UTC
This year: 237 at 03-24-2021 09:01 pm UTC
All time: 1100 at 08-08-2011 08:11 pm UTC