Skip to main content

Java

Solus includes multiple LTS versions of Java in the repositories. You can install more than one version in your system at once.

tip

If you need to install different versions of Java, use alternative installation methods such as SDKMAN!.

All Java packages in the Solus repositories include the Java Runtime Environment (JRE) and the Java Development Kit (JDK).

The following table lists the versions of Java available in the Solus repositories.

VersionPackage nameInstallation directoryIncluded componentsNotes
Java 11openjdk-11/usr/lib64/openjdk-11JRE, JDK, OpenJFX
Java 17openjdk-17/usr/lib64/openjdk-17JRE, JDK
Java 21openjdk-21/usr/lib64/openjdk-21JRE, JDK

Running Java applications

Important

Solus does not add Java to the PATH environment variable by default.

There are multiple ways to execute Java applications in Solus:

  • Create a .desktop file, then add env JAVA_HOME=/path/to/jdk/bin to Exec.
  • Create a script that sets JAVA_HOME before running the application.
  • Symlink the java executable from /path/to/jdk/bin to /usr/bin.
  • Add /path/to/jdk/bin to your PATH environment variable.