FreeBSD 安裝 JDK 1.5
作業環境:
- FreeBSD 6.2-Stable
- Diablo Caffe JDK 1.5.0-7
FreeBSD 安裝 Java Development Kit
步驟
1.下載 Diablo Caffe JDK
因為授權的關係,所以要到 FreeBSD Foundation 下載 JDK http://www.freebsdfoundation.org/downloads/java.shtml
選擇 Tarballs 並依照 Platform 選擇要下載的版本
下載完後放置在 /usr/ports/distfiles
2.安裝 Diablo Caffe JDK
[root@sun ]#cd /usr/ports/java/diablo-jdk15
[root@sun diablo-jdk15]#make install clean
3.Options for diablo-jdk 1.5.0.07.01_3
選擇 Update the time zone data
[X] TZUPDATE Update the time zone data
因為美國更改 Daylight Savings Time (DST) 所以要修正
到 Sun 抓 TZupdater tool
http://java.sun.com/developer/technicalArticles/Intl/USDST/
下載完後放置在 /usr/ports/distfiles
[root@sun diablo-jdk15]#make install clean
4.Hello World !! 測試
[root@sun ~]#joe helloworld.java
public class helloworld{
public static void main(String[] args) {
System.out.println("Hello World !!");
}
}
[root@sun ~]#javac helloworld.java
[root@sun ~]#java helloworld
Hello World !!
[root@sun ~]#