Translation(s): English - español- Français


Waving Duke

Quick Install Guide

JRE

To install the default JRE (Java Runtime Environment) on your system, run:

apt-get install default-jre

JDK

To install the default JDK (Java Development Kit) on your system, run:

apt-get install default-jdk

Java and Debian

Debian provides several Java implementations. Each of them have a development environment (JDK) and a runtime (known as JRE, or Java Virtual Machines JVM). Here's a list of Java environment. Just run aptitude search "?provides(java-runtime)" on your system to list available packages).

The default JRE/JDK installed in Debian isn't the same for all architecture. Check the dependency of the package default-jdk (or run apt-cache depends default-jdk on a system).

Origin

Spec.

Packages

Plugin

Free

Comments

OpenJDK

v17

JRE:openjdk-17-jre
JDK:openjdk-17-jdk

no

yes

Default Java for bookworm as of late 2022/early 2023, and is also available for install on bullseye

Origin

Spec.

Packages

Plugin

Free

Comments

OpenJDK

v11

JRE:openjdk-11-jre
JDK:openjdk-11-jdk

no

yes

Default Java for bullseye.

Origin

Spec.

Packages

Plugin

Free

Comments

OpenJDK

v11

JRE:openjdk-11-jre
JDK:openjdk-11-jdk

no

yes

Default Java for buster on ports where it is available.

OpenJDK

v8

JRE:openjdk-8-jre
JDK:openjdk-8-jdk

icedtea-8-plugin

yes

Default Java for stretch on ports where it is available.
Also available on jessie-backports (but no plugin).

OpenJDK

v7

JRE:openjdk-7-jre
JDK:openjdk-7-jdk

icedtea-7-plugin

yes

Default Java for jessie on ports where it is available.

GNU's GCJ

v5

JRE:gcj-jre
JDK:gcj-jdk

no

yes

Default Java on ports where OpenJDK is not available.
Available on jessie and stretch.

Sun Java

no

No longer available in Debian due to license reasons. Debian, however, provides an helper to generate Debian packages from upstream tarballs.
WARNING: there is no way to get automatic security updates. Remember to manually check for updates and generate and install the updated pacakges!

Understanding Java Virtual packages names

There are several virtual packages used in Debian for Java. These cover runtime compatibility and come in two flavours; headless (omits graphical interfaces) and normal. A dependency on javaX-runtime means that the package can work with any runtime which implements version X. Runtimes should provide all virtual packages which they support, so openjdk 6 provides java2-runtime, java5-runtime and java6-runtime.

Switching

Most java-related executables, multiple of which can be installed at any time, are managed by the 'alternatives' system. Instead of managing each alternative separately, you can update them all in one go with 'update-java-alternatives' from java-common

Developers - Java packaging work in Debian

General information and coordination

Work on specific application packages

TODO(wiki consolidation): maybe everything should be moved from here to Java/RequestedPackages?

User Documentation

See also


CategoryJava