1

I'm newbie on FreeBSD. How to install JRE on FreeBSD 8.x?

2

2 Answers 2

2

You can't (yet).

If you look at http://www.FreeBSDFoundation.org/downloads/java.shtml you'll see that the FreeBSD Foundation has packages for FreeBSD 6 and 7, but not for 8.

There may be another way, or someone else may even have created packages, but if they have, I don't know about it.

0

Java 8, 11, & 12 available

Work has recently resumed to keep up-to-date the Ports & Packages tree on FreeBSD for the latest and greatest Java versions.

These versions are based on the OpenJDK project (a consortium of Oracle, IBM, Apple, and others).

To install:

sudo pkg install openjdk12

You will find OpenJDK installed in /usr/local/openjdk12/.

You may want to set some environment variables to point to your OpenJDK installation. For example, in my .zshrc configuration file for zsh, I add this line:

path+=/usr/local/openjdk12/bin

Note that there is no longer any JRE for later versions of Java. With Applets and Java Web Start being phased out, there is no longer a need for end-users to install a Java runtime. Desktop and console apps are expected to be built with a Java runtime bundled inside. The Java Platform Module System and related tools such as jlink make this easier than ever, with a smaller runtime that includes only the libraries actually used by your particular app. For more info and links, see my Answer on sister site Stack Overflow.

In the future, you may also find releases of OpenJDK for FreeBSD on the AdoptOpenJDK web site. AdoptOpenJDK is a cooperative effort of some folks in the Java community to regularly publish binary builds of OpenJDK.

Be aware of the new Java release cadence. Java 8 and Java 11 are the current Long-term support (LTS) releases.

If you want to follow the progress on porting Java to FreeBSD, or perhaps assist, see this mailing list.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .