May 4, 2006

Java on FreeBSD

I just installed Java on my FreeBSD box. In the past it has been a nightmare to install Java due to licensing issues – BUT – the FreeBSD Foundation has negotiated a license with Sun to distribute JRE and JDK binaries for FreeBSD.

Installation is now very easy! Download the appropriate package from here and simply issue a pkg_add.

In my case it was

pkg_add diablo-jdk-freebsd6.i386.1.5.0.07.01.tbz

(I am currently running FreeBSD 6.1).

My installation baulked because javavmwrapper was not installed. A simple install from ports was all that was needed (it is a small package).

cd /usr/ports/java/javavmwrapper/
make
make install
make clean

After this I ran pkg_add again and the install went through without incident. It sure beats compiling the whole thing from sources.