On all platforms, a 1.5+ JRE is required to run Hudson. This is a challenge on FreeBSD 4.9, since the FreeBSD organization no longer supports this major version, and no 1.5+ JRE was ever licensed for distribution on the FreeBSD 4 platform. The FreeBSD Foundation did later license the Java JDK and JRE from Sun, but it is only available for FreeBSD 5 and later. If you are on FreeBSD 5 or later, just get your Java tools from the FreeBSD Foundation.
Failed Quick Solutions
- Get a pre-built JRE or JDK for FreeBSD 4. To the best of my knowledge, they don't exist, due to licensing problems when FreeBSD 4 was current.
- Get a Linux 1.5+ JRE to run on FreeBSD 4. Linux compatibility under FreeBSD 4 is not sufficient for the 1.5 and later JREs to run.
- Use the OpenJDK or IcedTea. I haven't tried this, but I suspect it won't build on FreeBSD 4, as few people are using FreeBSD 4
A working solution: build an older version of the 1.5 JDK
Steps to build your own 1.5 JRE:
- Get a 1.4 JDK installed and running, which is required as part of the 1.5 bootstrap build process
- Enable Linux compatibility in the FreeBSD kernel. Run "kldload linux" with root permissions.
- Enable Linux procfs compatibility.
- Add "linproc /compat/linux/proc linprocfs rw 0 0" to your /etc/fstab
- Load the procfs kernel module "kldload linprocfs"
- Mount the filesystem "mount /compat/linux/proc"
- Install Linux libraries. The machine I am using already had these installed - check /compat/linux/lib for a bunch of .so files. If there aren't any, install one of the linux emulation ports under /usr/ports/emulators
- Install the Linux 220.127.116.11 JDK. Later releases of the 1.4.2 JDK use Linux functionality that FreeBSD 4.x is not able to satisfy, and none of the tools will run.
- Run javac from the 18.104.22.168. If you get the usage screen, you are done with installing a bootstrap JDK.
- Get the JRL/JIUL source distribution and installation binaries from Sun
- http://download.java.net/tiger/archive/tiger_u11/index.html; This link goes to the patchlevel 11 sources of the 1.5.0 JDK. Get both the source distribution and installation binaries. You will have to decide which license is appropriate for your use of these source files.
- Get the BSD patches from eyesbeyond.com
- http://www.eyesbeyond.com/freebsddom/java/JDK15JRLConfirm.html; Choose patchset 5 to match the JDK sources downloaded in the previous step
- Apply patch and build
- Follow the instructions in the file BUILD, inside the eyesbeyond tarball.
- Use the newly built JRE to start Hudson as a master, or more likely, as a slave