博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
java sun.org.mozilla_maven编译找不到符号 sun.org.mozilla.javascript.internal
阅读量:1532 次
发布时间:2019-04-21

本文共 1474 字,大约阅读时间需要 4 分钟。



问题:

[ERROR] 位置: 类 cn.ffcs.dep.rule.script.javascript.JSAdapter 软件包 sun.org.mozilla.javascript.internal 不存在

[ERROR] -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-p

lugin:3.1:compile (default-compile) on project sq-edi-component: Compilation failure

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure

at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:858)

解决:

添加javac编译时的参数bootclasspath,oracle sun不鼓励开发人员直接使用sun.*里面的代码,主要的原因是sun.*里面的代码就是实现jvm的底层代码,是平台相关的,而且相关实现随着版本升级随时可能会被替换,代码的稳定性、一致性等等都存在问题. 参考下http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javac.html javac的相关参数说明

Sometimes, you need to pass other compiler arguments that are not handled by the Compiler Plugin itself but is supported by the compilerId selected. For such arguments, the Compiler Plugin's compilerArguments will be used. The following example passes compiler arguments to the javac compiler:

[...]

[...]

org.apache.maven.plugins

maven-compiler-plugin

2.3.2

-verbose -bootclasspath ${java.home}\lib\rt.jar

[...]

[...]

Or you can also use the Map version:

[...]

[...]

org.apache.maven.plugins

maven-compiler-plugin

2.3.2

${java.home}\lib\rt.jar

[...]

[...]

转载地址:http://mkudy.baihongyu.com/

你可能感兴趣的文章
泛型与通配符详解
查看>>
BaseServiceImpl中的实现关键点
查看>>
Struts2中的session、request、respsonse获取方法
查看>>
如何理解MVC模型
查看>>
SpringMVC中乱码解决方案
查看>>
SpringMVC中时间格式转换的解决方案
查看>>
post和get请求相关知识点
查看>>
关于try finally 中的return语句的问题
查看>>
RequestBody/ResponseBody处理Json数据
查看>>
springmvc请求参数获取的几种方法
查看>>
在eclipse中创建和myeclipse一样的包结构
查看>>
Java中的IO流
查看>>
java中的关键字
查看>>
如果某个方法是静态的,它的行为就不具有多态性
查看>>
优化Hibernate所鼓励的7大措施
查看>>
Java 8系列之重新认识HashMap
查看>>
HashMap 、 ArrayList、String 重写了equals方法 而Object类(比如User)没有重写
查看>>
Servlet的生命周期
查看>>
Object中的getClass()返回的是当前运行的类
查看>>
加载驱动程序的方法
查看>>