Configure the JDK
This table shows the JDK versions that are by default used by Qodana:
Using the default version of the JDK does not require any special configuration.
Apart from the versions available by default, Qodana can automatically download and use these versions of JBR SDK for all JVM linters: 8, 11, 13, 15, 16, 17, 18, 19.
Otherwise, you can download the required JDK version, and mount it to Qodana.
qodana.yaml file, you can specify the JDK version using the
projectJDK option, for example:
You can also specify JDK using the name:
If you specify here any JDK from the list of available versions, it will be automatically downloaded by Qodana. If you would like to use the JDK beyond this list, you will have to download it and then mount it to Qodana.
Gradle runs scripts based on the Compatibility Matrix meaning that the latest supported and downloadable version of the JDK will be set up as the Gradle JDK. Using the Compatibility Matrix in combination with the list of available JDK versions, you can find the JDK that will be used by Qodana. For example, in case of Gradle 6.6, Qodana will download and employ JDK 13.
In Maven, you can configure the source and target versions of the Java compiler. Qodana compares these values and selects the latest version. This version of the JDK is then searched in the list of available versions. If found, Qodana will download and use it. Otherwise, Qodana will download the subsequent version from this list.
You can mount JDK from your local filesystem to the
/root/.jdks folder of the Qodana Docker image: