Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Having trouble installing JSQLFormatter #2171

erickaufmann16 started this conversation in General
Discussion options

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

You must be logged in to vote

Replies: 1 comment 1 reply

Comment options

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).

You must be logged in to vote
1 reply
Comment options

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /