WebService cxf No compiler detected, make sure you are running on top of a JDK instead of a JRE
[2022-11-14 09:55:01.644] ERROR [scheduling-1] ZysoftServiceImpl.java:384 - No compiler detected, make sure you are running on top of a JDK instead of a JRE.
java.lang.IllegalStateException: No compiler detected, make sure you are running on top of a JDK instead of a JRE.
at org.apache.cxf.common.util.Compiler.useJava6Compiler(Compiler.java:193)
at org.apache.cxf.common.util.Compiler.compileFiles(Compiler.java:141)
at org.apache.cxf.common.util.Compiler.compileFiles(Compiler.java:136)
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.compileJavaSrc(DynamicClientFactory.java:639)
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:389)
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:244)
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:237)
at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:192)
安装 JDK 默认使用 JRE 环境,新增 JAVA_HOME 环境变量,指向 JDK 目录即可
把jdk安装目录\lib\tools.jar复制到jre安装目录\lib文件夹下
java -jar springbootdemo.jar
#启动命令修改为
"%JAVA_HOME%\bin\java" -jar springbootdemo.jar