LINUX.ORG.RU

kotlin-language-server Path for java installation '/usr/lib/jvm/openjdk-17' does not contain a java executable

 ,


0

0
# install kotlin-language-server
TARGET='kotlin-language-server'
URL='https://github.com/fwcd/kotlin-language-server'
DIR_PKG="/home/distfiles/debian/${DISTR_VERSION}/mypkg/${TARGET}"
DIR_OUT="/opt/${TARGET}"

mkdir -p "${DIR_PKG}"
if [ -n "$(find ${DIR_PKG} -maxdepth 0 -type d -empty 2>/dev/null)" ]; then
    git clone "${URL}" "${DIR_PKG}"
fi

cd "${DIR_PKG}"
./gradlew :server:installDist
env |grep JAVA_HOME
JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/

out:

Cloning into '/home/distfiles/debian/bookworm/mypkg/kotlin-language-server'...
remote: Enumerating objects: 13534, done.
remote: Counting objects: 100% (150/150), done.
remote: Compressing objects: 100% (92/92), done.
remote: Total 13534 (delta 44), reused 117 (delta 33), pack-reused 13384
Receiving objects: 100% (13534/13534), 37.31 MiB | 302.00 KiB/s, done.
Resolving deltas: 100% (5519/5519), done.
Updating files: 100% (252/252), done.
Path for java installation '/usr/lib/jvm/openjdk-17' (Common Linux Locations) does not contain a java executable

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of null.
> Could not resolve all dependencies for configuration ':buildSrc:buildScriptClasspath'.
   > Failed to calculate the value of task ':buildSrc:compileJava' property 'javaCompiler'.
      > No matching toolchains found for requested specification: {languageVersion=11, vendor=any, implementation=vendor-specific}.
         > No locally installed toolchains match (see https://docs.gradle.org/8.1/userguide/toolchains.html#sec:auto_detection) and toolchain download repositories have not been configured (see https://docs.gradle.org/8.1/userguide/toolchains.html#sub:download_repositories).

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 8s
★★★

Последнее исправление: serg002 (всего исправлений: 1)
18 сентября 2023 г.