[ https://issues.apache.org/jira/browse/SOLR-15888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17468071#comment-17468071 ]
Michael Joyner commented on SOLR-15888: --------------------------------------- Ensuring a consistent environment would probably be a good idea. The following example build.gradle snippet example would ensure a consistent OpenJDK 11 environment across systems. // _Requires Gradle 6.8+. Will autodownload the AdoptOpenJDK._ compileJava.options.encoding = 'UTF-8' compileJava.options.release = 11 compileTestJava.options.encoding = 'UTF-8' compileTestJava.options.release = 11 java.toolchain.languageVersion = JavaLanguageVersion.of(11) java.toolchain.vendor = JvmVendorSpec.ADOPTOPENJDK > 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 > Priority: Minor > > 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-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org