Java报错记录汇总

2020-05-16  本文已影响0人  摘星马里奥

1.tools.jar引发的惨案一

cxf webservice的深坑---Unable to create schema compiler

[java.lang.ClassNotFoundException: com.sun.tools.internal.xjc.api.XJC]

问题:webservice部署成jar包,在生产环境运行无法找到相关依赖包——tools.jar,既无法通过maven/gradle的方式引入,会报新的错误,无法定位到调用位置,无法在生成服务器上断点调试。

解决:检查:

(1)java环境CLASSPATH:.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;

JAVA_HOME:C:\Program Files\Java\jdk1.8.0_112

(2)对应java路径下的lib是否包含tools.jar,以及对应的两处jre路径下的lib

2.tools.jar引发的惨案二

Gradle 'hurd-server' project refresh failed

Error:The newly created daemon process has a different context than expected.

Java home is different.

Expecting: 'C:\Program Files\Java\jdk1.8.0_112' but was: 'C:\Program Files\Java\jdk1.8.0_112\jre'.

Please configure the JDK to match the expected one.

<a href="open.project.structure">Open JDK Settings</a>

问题:gradle build失败,clean失败,refresh失败,报java home different错误

上一篇下一篇

猜你喜欢

热点阅读