Dancing Kayak - FreeBSD - Java Installation

Here are all the details on how to install Java on FreeBSD (based on 4.9) on a machine

Building Java 1.3

Obtain Licensed Files

Install the following files in /usr/ports/distfiles

The first one is a set of source code patches to the Java source. Find this at Eyes Beyond

The others are available at Sun's Java web site. You will have to register and sign up for Sun's source code access program (whatever it's called).

Build

Run as root

  1. cd /usr/ports/java/jdk13
  2. make
  3. make install clean
  4. pay attention to the build notes

Building Java 1.4

Obtain Licensed Files

Install the following files in /usr/ports/distfiles

The first one is a set of source code patches to the Java source. Find this at Eyes Beyond

The others are available at Sun's Java web site. You will have to register and sign up for Sun's source code access program (whatever it's called).

Prepare Linux Compatibility for the Linux Java VM

Add the following entry to /etc/fstab (with tabs separating the columns)

linprocfs /compat/linux/proc linprocfs rw 0 0

Then, run the following commands as root

  1. kldload linprocfs
  2. mount /compat/linux/proc

If you don't do this, the build will hang because the Linux VM used to bootstrap the native FreeBSD JDK build looks for the Linux-style proc mount. Also, the system will have a high load average if you don't, so if you don't and get into this situation, kill the build, then kill -9 the Linux Java process.

Build the native FreeBSD JDK

Run as root

  1. cd /usr/ports/java/jdk14
  2. make install clean

Back to FreeBSD main page