Gradle 构建 tools.jar 未找到
Gradle build tools.jar not found
我正在尝试在 RHEL EC2 中构建 spring 引导应用程序 machine.I 在 gradle 构建
中找不到 "tools.jar"
readlink -f $(which java)
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-2.el8_1.x86_64/jre/bin/java
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-2.el8_1.x86_64/jre
echo $JAVA_HOME
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-2.el8_1.x86_64/jre
但是当我尝试构建时出现以下错误
$gradle build
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Could not find tools.jar. Please check that /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-
2.el8_1.x86_64/jre contains a valid JDK installation.
* 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.
我安装了 jdk 和 运行 $yum install java-1.8.0-openjdk-devel.After 这个构建是成功的jre路径
我正在尝试在 RHEL EC2 中构建 spring 引导应用程序 machine.I 在 gradle 构建
中找不到 "tools.jar"readlink -f $(which java)
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-2.el8_1.x86_64/jre/bin/java
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-2.el8_1.x86_64/jre
echo $JAVA_HOME
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-2.el8_1.x86_64/jre
但是当我尝试构建时出现以下错误
$gradle build
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Could not find tools.jar. Please check that /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-
2.el8_1.x86_64/jre contains a valid JDK installation.
* 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.
我安装了 jdk 和 运行 $yum install java-1.8.0-openjdk-devel.After 这个构建是成功的jre路径