In order to make a newly-built version of java act as the default java version, copy the entire ./build/bsd-i586/j2sdk-image dir to /usr/local/java-1.7.0-internal and add a suffix with the date:
$ sudo mv build/bsd-i586/j2sdk-image /usr/local/java-1.7.0-internal-`date "+%Y_%m_%d"`
Link /usr/local/java-1.7.0 to the latest build:
$ cd /usr/local $ sudo ln -s java-1.7.0-internal-`date "+%Y_%m_%d"` java-1.7.0
I encapsulated these functions in the script update-usr-local.sh:
#!/bin/sh buildname=java-1.7.0-internal-`date "+%Y_%m_%d"` sudo rm -rf /usr/local/$buildname sudo mkdir /usr/local/$buildname sudo cp -r build/bsd-i586/j2sdk-image/* /usr/local/$buildname cd /usr/local sudo rm -f java-1.7.0 sudo ln -s $buildname java-1.7.0
This results in a new JVM:
$ ls -l /usr/local .... lrwxr-xr-x 1 root wheel 38 Jan 31 20:58 java-1.7.0 -> java-1.7.0-internal-2009_01_31 drwxr-xr-x 15 root wheel 510 Jan 31 21:37 java-1.7.0-internal-2009_01_31 $ /usr/local/java-1.7.0/bin/java -version openjdk version "1.7.0-internal" OpenJDK Runtime Environment (build 1.7.0-internal-stephen_2009_01_25_23_54-b00) OpenJDK Server VM (build 14.0-b10, mixed mode)
Overview
Content Tools
ThemeBuilder