-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Having trouble installing JSQLFormatter #2171
-
Hey guys,
When I execute command 'gradlew.bat publishToMavenLocal' from this installation guide: https://manticore-projects.com/JSQLFormatter/install.html, I got the following error message:
- What went wrong:
Execution failed for task ':compileJava'.
Error while evaluating property 'javaCompiler' of task ':compileJava'.
Failed to calculate the value of task ':compileJava' property 'javaCompiler'.
> Cannot find a Java installation on your machine matching this tasks requirements: {languageVersion=11, vendor=any, implementation=vendor-specific} for WINDOWS on x86_64.
> No locally installed toolchains match and toolchain download repositories have not been configured.
The Java version installed on my machine is 22. Does it mean that I need to install an instance of Java 11 to make the compilation go through?
Alex
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 1 reply
-
Greetings!
Please double check and pull from Github again:
java { withSourcesJar() withJavadocJar() sourceCompatibility = '11' targetCompatibility = '11' // needed for XML-Doclet to work (since Doclet changed again with Java 13) toolchain { languageVersion.set(JavaLanguageVersion.of(17)) } }
Should automatically pick any suitable JDK17 or better on your system and I have compiled successfully with JDK17 or JDK21 here (on LINUX though).
Beta Was this translation helpful? Give feedback.
All reactions
-
Just in case, try to explicitely set JAVA_HOME:
are@archlinux ~/d/s/J/JSQLFormatter (main)> JAVA_HOME=/usr/lib/jvm/java-17-openjdk/ gradle publishToMavenLocal
Although you need to adopt the Windows specific syntax please.
Beta Was this translation helpful? Give feedback.