admin

启动 Tomcat 报 ./catalina.sh: 1: eval: /opt/jdk12.0.1/jre/bin/java: not found
服务器上尝试安装了一下jdk12,然后启动Tomcat就报了./catalina.sh: 1: eval: /op...
扫描右侧二维码阅读全文
15
2019/11

启动 Tomcat 报 ./catalina.sh: 1: eval: /opt/jdk12.0.1/jre/bin/java: not found

服务器上尝试安装了一下jdk12,然后启动Tomcat就报了./catalina.sh: 1: eval: /opt/jdk12.0.1/jre/bin/java: not found这个错误。

很明显,进入到jdk12的安装目录,发现竟然真的没有jre目录。

解决办法是有的。但不是去别的地方拷贝,这样太麻烦了,可以在jdk的安装目录执行以下命令即可生成jre目录:

[email protected]:/opt/jdk12.0.1# jlink --module-path jmods --add-modules java.desktop --output jre

再次启动Tomcat报错:

Exception in thread "main" java.lang.NoClassDefFoundError: java/util/logging/Logger

可能是Tomcat版本和JDK版本不兼容导致的,唉,懒得折腾了,退回JDK8版本- -~!

Last modification:November 15th, 2019 at 01:54 am
If you think my article is useful to you, please feel free to appreciate

Leave a Comment