java freebsd – How to Install Java on FreeBSD

freebsdjava

I have a FreeBSD server with root access and I'm trying to install java on it.
I've tried to install diablo from the /usr/ports/java/diablo-jre15 directory, and it gave me a URL to download a file to /usr/ports/distfiles/. I did what it said, and then I ran:

make install clean

and it gave me the following error:

===>  Vulnerability check disabled, database not found
===>  Found saved configuration for diablo-jre-1.5.0.07.01_9
===>  Extracting for diablo-jre-1.5.0.07.01_9
=> MD5 Checksum mismatch for diablo-latte-freebsd6-i386-1.5.0_07-b01.tar.bz2.
=> SHA256 Checksum mismatch for diablo-latte-freebsd6-i386-1.5.0_07-b01.tar.bz2.
===>  Refetch for 1 more times files: diablo-latte-freebsd6-i386-1.5.0_07-b01.tar.bz2 diablo-latte-freebsd6-i386-1.5.0_07-b01.tar.bz2
===>  Vulnerability check disabled, database not found
===>  Found saved configuration for diablo-jre-1.5.0.07.01_9
=> diablo-latte-freebsd6-i386-1.5.0_07-b01.tar.bz2 doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/.
fetch: transfer timed out
=> Couldn't fetch it - please try to retrieve this
=> port manually into /usr/ports/distfiles/ and try again.
*** Error code 1

I can see that the file is in the right directory and still it gives me the same error.

I'm using FreeBSD 6.2-RELEASE-p12.

Best Answer

Diablo JDK/DRE is horribly outdated. Don't use it.

Install java/openjdk6 instead (or java/openjdk7 if you want the devel version)

If these do not appear in your ports tree (as you're using a similarly horribly outdated, unsupported version of FreeBSD with known security vulnerabilities) you'll need to update it with cvsup, csup, or portsnap (not sure if it that was available in 6.2).