Tag Archives: Java FreeBSD

How To Install Java on FreeBSD 10.1

How To Install Java on FreeBSD 10.1

Introduction

Java is a popular software platform that allows you to run Java applications and applets.

This tutorial covers how to install the following Java releases on FreeBSD 10.1, using packages and ports:

  • OpenJDK 7 JDK (default)
  • OpenJDK 8 JRE / JDK
  • OpenJDK 6 JRE / JDK

This guide does not cover the installation of Oracle Java because only the 32-bit version is supported on FreeBSD, through the Linux Binary Compatibility feature. Additionally, OpenJDK satisfies the Java needs of most users.

Prerequisites

Before you begin this guide, you should have a FreeBSD 10.1 server. Also, you must connect to your FreeBSD server as a user with superuser privileges (i.e. is allowed to use sudo or change to the root user).

Variations of Java

There are two different Java packages that can be installed: the Java Runtime Environment (JRE) and the Java Development Kit (JDK). JRE is an implementation of the Java Virtual Machine (JVM), which allows you to run compiled Java applications and applets. The JDK includes the JRE and other software that is required for writing, developing, and compiling Java applications and applets.

You may install various versions and releases of Java on a single system, but most people only need one installation. With that in mind, try to only install the version of Java that you need to run or develop your application(s). Continue reading How To Install Java on FreeBSD 10.1