Which JDK should I get

Java

The free Java implementation Oracle OpenJDK is installed on the computers of the FIM computer pools.
For reasons of compatibility, the current long-term support version is used as standard.

Java development environments

Various development environments are available for developing Java applications.
You can find it under the following name in the start menu (usually in the "Development" category), or alternatively you can start it using the shell commands given in brackets:

  • Eclipse IDE for Java ('eclipse-java')
  • Eclipse IDE for Java Enterprise ('eclipse-jee')
  • IntelliJ IDEA Community Edition ('intellij-idea-community.sh')
  • IntelliJ IDEA Ultimate Edition ('intellij-idea-ultimate.sh')

The Enterprise and Ultimate variants contain additional features that are particularly helpful for more advanced software development (e.g. the SEP / EP), but can also be used in general.
You can easily obtain a free training license for IntelliJ IDEA Ultimate from FIM system support.

Additional Java versions

In addition to the LTS version, we also provide additional Java versions for teaching, which you can choose yourself if required.

These additional Java versions are intended to ensure a consistent state at least for the duration of the respective course and therefore may not contain all current security updates.
They should therefore only be used selectively, e.g. for work on exercises - which is the standard behavior anyway when using the 'usejava' function manually.

Show Java versions

With the shell command 'usejava'you can check out the available Java versions display:

$ usejava
usejava: Set the default JRE / JDK version for the current shell instance

Usage: usejava
e.g. usejava 11

Available Java versions:
  11
14-cip

The currently selected Java version can be displayed directly via Java itself:

$ java --version
openjdk 11.0.9.1 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1 + 1-post-Debian-1deb10u2)
OpenJDK 64-Bit Server VM (build 11.0.9.1 + 1-post-Debian-1deb10u2, mixed mode, sharing)

Change Java versions

If you want to use a different Java version, you can do this conveniently using the shell command 'usejava' to do.
The command sets the Java version for the currently running shell instance, i.e. After restarting the shell, the system-wide preset Java version is used again.

$ java --version
openjdk 11.0.9.1 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1 + 1-post-Debian-1deb10u2)
OpenJDK 64-Bit Server VM (build 11.0.9.1 + 1-post-Debian-1deb10u2, mixed mode, sharing)

$ usejava 14-cip

$ java --version
openjdk 14.0.2 2020-07-14
OpenJDK Runtime Environment (build 14.0.2 + 12-46)
OpenJDK 64-Bit Server VM (build 14.0.2 + 12-46, mixed mode, sharing)

Note: A global change (e.g. by calling 'usejava'in .xprofile, .bashrc, .zshrc, etc.) is possible, but not recommended, as the installed software has only been tested with the JDK version selected by default and the additional Java versions usually do not receive any updates for courses to offer a consistent version.

Change the Java version in Eclipse

Please note that changing the Java version via the program 'usejava'has no influence on the compiler options of the IDE Eclipse.
If you also want to convert your Eclipse projects to a different Java version, you have to do this directly in Eclipse.

To do this, navigate in Eclipse as follows to access the Eclipse JRE settings:

Window ➔ Preferences ➔ Java ➔ Installed JREs

You can now use the Eclipse dialog box to change the standard JRE or add additional JREs.
The path to the existing JREs results from the version number (see 'usejava'), e.g./ usr / lib / jvm / java-11-openjdk-amd64 for version 11 or/ usr / lib / jvm / java-14-cip-openjdk-amd64 for version 14-cip.

Change the Java version in IntelliJ IDEA

Please note that changing the Java version via the program 'usejava'has no influence on the compiler options of the IDE IntelliJ IDEA.
If you also want to convert your IntelliJ projects to a different Java version, you have to do this directly in IntelliJ IDEA.

To do this, navigate in IntelliJ IDEA as follows to access the IntelliJ IDEA JRE settings:

File ➔ Project Structure… ➔ Project

In the "Project SDK" drop-down list, you can now change the JRE version for the current project, or add additional JREs if they are not already in the list.
The path to the JREs results from the version number (see 'usejava'), e.g./ usr / lib / jvm / java-11-openjdk-amd64 for version 11 or/ usr / lib / jvm / java-14-cip-openjdk-amd64 for version 14-cip.