Java 12 support

It’s been a while since JDK 12 was released, but I’m still getting this exception with Sonar Maven plugin (org.sonarsource.scanner.maven:sonar-maven-plugin:

Caused by: java.lang.NumberFormatException: For input string: "12-ea"
    at java.lang.NumberFormatException.forInputString (
    at java.lang.Integer.parseInt (
    at java.lang.Integer.parseInt (
    at (
    at<clinit> (
    at<clinit> (
    at<init> (
    at<init> (
    at<init> (
    at org.sonar.scanner.bootstrap.ScannerPluginInstaller.listInstalledPlugins (
    at org.sonar.scanner.bootstrap.ScannerPluginInstaller.loadPlugins (
    at org.sonar.scanner.bootstrap.ScannerPluginInstaller.installRemotes (
    at org.sonar.scanner.bootstrap.ScannerPluginRepository.start (

Am I doing something wrong or still JDK isn’t supported?


Welcome to the community. :slight_smile:

We target the LTS versions of Java for support, so primarily Java 11 right now. You should downgrade your JDK.


Anyway, I’m running JDK 12 on my PC and everything works correctly. The 12-ea string indicates that you’re running an early access build of JDK 12, not an “official” release.


Thanks for the information @felipebz. Looks like the scanner is having trouble parsing the java version with early access releases.

Please try with an official release and if you find any problems we will try to fix them in upcoming releases. As Ann mentioned, we only guarantee (and test) support of Java 11.