一、以下的包要先下载放到各自的目录下
/usr/ports/distfiles
bsd-jdk14-patches-3.tar.gz
fontconfig-2.2.90.tar.gz
freetype-2.1.4.tar.bz2
j2sdk-1_4_1-src-scsl.zip
j2sdk-1_4_2_01-Linux-i586.bin
m4-1.4.tar.gz
make-3.80.tar.bz2
unzip550.tar.gz
zcrypt29-eXPortable.zip
zip23.tar.gz
/usr/ports/distfiles/xc
Wraphelp2.gz
X430src-1.tgz
X430src-2.tgz
X430src-3.tgz
X430src-4.tgz
X430src-5.tgz
X430src-6.tgz
X430src-7.tgz
/usr/ports/distfiles/gnome2
pkgconfig-0.15.0.tar.bz2
/usr/ports/distfiles/openmotif
openmotif-2.2.2.tgz
二、Linux支持安装 /usr/ports/emulators/linux_base的ports,中间会提示要进行如下的操作 # kldload linprocfs
# mount -t linprocfs /compat/linux/proc
三、开始编译安装
cd /usr/ports/Java/jdk14
#make install clean
耐心等待了......(我的是P42.0,DDR256,编译了近6个小时)
四、配置
.cshrc加入:
setenv ALT_BOOTDIR /usr/local/linux-sun-jdk1_4_2_01/bin/java
setenv ALT_JAVAWS_BOOTDIR /usr/local/linux-sun-jdk1_4_2_01/bin/java
/etc/fstab 加入:
linproc /compat/linux/proc linprocfs rw 0 0
五、设置环境变量:
~/.bashrc 加入:
export JAVA_HOME=/usr/local/linux-sun-jdk1_4_2_01
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$JAVA_HOME/jre
export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin