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

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.

Version Package name Installation directory Included components Notes
Java 11 openjdk-11 /usr/lib64/openjdk-11 JRE, JDK, OpenJFX
Java 17 openjdk-17 /usr/lib64/openjdk-17 JRE, JDK
Java 21 openjdk-21 /usr/lib64/openjdk-21 JRE, JDK

Running Java applications

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.