You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Andy Lester (Jira)" <ji...@apache.org> on 2022/01/03 04:12:00 UTC

[jira] [Created] (SOLR-15888) Confusing error message when javac is not installed

Andy Lester created SOLR-15888:
----------------------------------

             Summary: Confusing error message when javac is not installed
                 Key: SOLR-15888
                 URL: https://issues.apache.org/jira/browse/SOLR-15888
             Project: Solr
          Issue Type: Improvement
      Security Level: Public (Default Security Level. Issues are Public)
          Components: Gradle
            Reporter: Andy Lester


I was trying to get gradlew going but did not have the proper java-11-openjdk-devel package installed.  This meant I didn't have javac installed.

gradlew tries to do compile WrapperDownloader early on, and the error message was very confusing:

{{Exception in thread "main" java.lang.IllegalArgumentException: error: release version 11 not supported}}
{{    at jdk.compiler/com.sun.tools.javac.main.Arguments.reportDiag(Arguments.java:891)}}
{{    at jdk.compiler/com.sun.tools.javac.main.Arguments.handleReleaseOptions(Arguments.java:311)}}
{{    at jdk.compiler/com.sun.tools.javac.main.Arguments.processArgs(Arguments.java:350)}}
{{    at jdk.compiler/com.sun.tools.javac.main.Arguments.init(Arguments.java:246)}}
{{    at jdk.compiler/com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:185)}}
{{    at jdk.compiler/com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:119)}}
{{    at jdk.compiler/com.sun.tools.javac.launcher.Main.compile(Main.java:364)}}
{{    at jdk.compiler/com.sun.tools.javac.launcher.Main.run(Main.java:176)}}
{{    at jdk.compiler/com.sun.tools.javac.launcher.Main.main(Main.java:119)}}
{{\nSomething went wrong. Make sure you're using Java 11 or later.}}

The first line says "release version 11 not supported" and the last says "Make sure you're using Java 11." Those seem contradictory. [~bunchr] came to my rescue and suggested that I needed javac, and that led me to get the right package installed.

(Also, there's an incorrect literal "\n" in the last line)

Maybe an explicit check for javac before trying to build, and corresponding specific error message, would help better identify the problem.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org