FreeBSD deals many kind of JDKs. But, at the time of writing this article, OpenJDK7 is the only one that are ready for Java7. So that I introduce the way to install OpneJDK7 on FreeBSD.
Edit /etc/make.conf for OpenJDK7
Add these definitions to
/etc/make.conf:
JAVA_VENDOR=openjdk
JAVA_VERSION=1.7
BOOTSTRAPJDKDIR=/usr/local/openjdk7
JAVA_PREFERRED_PORTS=JAVA_PORT_NATIVE_OPENJDK_JDK_1_7
Install via packages (mandatory)
# pkg_add -r openjdk7
That's all. Let's check the output of
java -version command.
Install via ports (option)
If we want to install openjdk7 via ports, however, we must prepare for another JDK to be installed. In this article, I suggest to install openjdk7 via packages(above) at first, then install openjdk7 via ports.
# pkg_add -r openjdk7
# cd /usr/ports/java/openjdk7
# make install clean
# pkgdb -F
Let's check again
java -version command.
No comments:
Post a Comment