cxf 动态调用 WebService No compiler detected, make sure you are running on top of a JDK instead of a JRE

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 目录即可

新增JAVA_HOME环境变量

image

修改 Path 环境变量

image

修改运行命令

java -jar springbootdemo.jar
#启动命令修改为
"%JAVA_HOME%\bin\java" -jar springbootdemo.jar
posted @ 2022-11-14 10:17  VipSoft  阅读(381)  评论(0编辑  收藏  举报