1

I read the docs from quarkus and it is said that the following jdk versions are supported:

JDK 8 or 11+ installed with JAVA_HOME configured appropriately

Actually, I have JDK 12 installed. Can I use the following?:

<maven.compiler.release>1.11</maven.compiler.release>

maven.compiler.release is the same as:

<maven.compiler.source>1.11</maven.compiler.source>
<maven.compiler.target>1.11</maven.compiler.target>

EDIT:

Quarkus works with:

<maven.compiler.source>1.12</maven.compiler.source
<maven.compiler.target>1.12</maven.compiler.target> 

or

<-- Note: 12 instead of 1.12 -->
<maven.compiler.release>12</maven.compiler.release>
nimo23
  • 5,170
  • 10
  • 46
  • 75

2 Answers2

3

Update: starting with Quarkus 2.x, the minimal requirement is JDK 11+. JDK 17 is supported too. JDKs newer than 17 should work but are not actively tested.

====

On Linux and MacOS, you can use JDK 8 to 13.

On Windows, you can use JDK 8 to 12 as we are affected by a JDK bug: see https://github.com/quarkusio/quarkus/issues/5359 .

You can compile to something specific to your version if you are only planning to use the said JVM.

As for why our examples are all using JDK 8: they are built to also support native images via GraalVM and until very recently GraalVM only supported JDK 8. GraalVM 19.3.0 just added support for JDK 11 as a preview (and we are working on it).

Guillaume Smet
  • 9,921
  • 22
  • 29
  • No, **quarkus cannot compile on JDK 12**. compile error: `Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project test Fatal error compiling: error: release version 1.12 not supported -> [Help 1] `. However, with `1.11` it works. – nimo23 Nov 27 '19 at 00:26
  • 1
    You need to use `12`, not `1.12`. – Guillaume Smet Nov 27 '19 at 14:27
  • yes, was my fault. With `12` it works. Thanks! – nimo23 Nov 27 '19 at 14:29
1

You can use Quarkus with Java 12. There are plenty of ways to configure Maven to use that version, see this for example.

geoand
  • 60,071
  • 24
  • 172
  • 190
  • And can I use Java 13? Why the docs said that quarkus only work with JDK 8 or 11+. In all quarkus-examples, 1.8 is used. If using java 12, do I must compile the source to lower versions (e.g. `1.11` ? The maven `release`-tag replaces three flags: -source, -target and **-bootclasspath**. So I set the "-bootclasspath" in quarkus implicitly. Is this ok or should I better use `maven.compiler.source` and `maven.compiler.target`? – nimo23 Nov 26 '19 at 10:15
  • 1
    I think either way would work. Java 13 should also work – geoand Nov 26 '19 at 23:00
  • Quarkus only works with `1.11 1.11`. It fails when using `1.11`. Error: `Fatal error compiling: error: release version 1.11 not supported -> [Help 1] `. So quarkus has problems with the `maven.compiler.release`-tag with implicitly sets the `-bootclasspath`. – nimo23 Nov 27 '19 at 10:11
  • Can you please open a github issue you exact steps to reproduce the problem along with an example project that exhibits the behavior you describe? Thanks – geoand Nov 27 '19 at 14:25