Question

I need to install Oracle JDK on FreeBSD 9.1.

I have install FreeBSD 9.1 with no ports attached into it.

So I downloaded jdk-7u25-linux-x64.tar.gz from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

Now I just have no idea how to install and make it work on my FreeBSD.

Please help me. Thank you.

Was it helpful?

Solution

If you don't want to add the ports sources to your system, you can install from binary packages.

Java on FreeBSD is the OpenJDK implementation, for Java7, the command should be

pkg_add -r openjdk

While for Java6, it is:

pkg_add -r openjdk6

Due to redistribution restrictions, it isn't possible to use 'pkg_add -r' to install the linux distribution of Oracle JDK. Also, the linux emulation is only 32-bit. So, the java/linux-sun-jdk17 port would use "jdk-7u25-linux-i586.tar.gz".

OTHER TIPS

You can use ports.

The recommended Java implementation is OpenJDK in /usr/ports/java/openjdk7.

You can use the Linux implementation of Sun's (now Oracle) java with /usr/ports/java/linux-sun-jdk17. Note that this has some legal restrictions, see the port Makefile.

Build your own - it's trivial to build OpenJDK from source these days - see https://java.net/projects/adoptopenjdk/ for details (Full Disclosure: I'm an admin on that project).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top