maven编译找不到符号 sun.org.mozilla.javascript.internal
来源:互联网 发布:minitab分析股市数据 编辑:程序博客网 时间:2024/05/19 04:27
问题:
[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 thecompilerId selected. For such arguments, the Compiler Plugin's compilerArguments will be used. The following example passes compiler arguments to thejavac compiler:
<project> [...] <build> [...] <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <compilerArgument>-verbose -bootclasspath ${java.home}\lib\rt.jar</compilerArgument> </configuration> </plugin> </plugins> [...] </build> [...]</project>
Or you can also use the Map version:
<project> [...] <build> [...] <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <compilerArguments> <verbose /> <bootclasspath>${java.home}\lib\rt.jar</bootclasspath> </compilerArguments> </configuration> </plugin> </plugins> [...] </build> [...]</project
- maven编译找不到符号 sun.org.mozilla.javascript.internal
- ant 编译时 出现package sun.org.mozilla.javascript.internal does not exist 错误
- com.sun.org.apache.xml.internal.security.utils.Base64 包找不到导致编译失败
- maven编译提示软件包找不到符号
- maven编译提示软件包找不到符号
- maven编译提示软件包找不到符号
- maven 编译时提示com.sun包找不到
- AndroidStudio 编译问题org/gradle/api/publication/maven/internal/DefaultMavenFactory
- Maven编译项目报错:某些类找不到符号
- maven 找不到符号 或者总是报编译错误
- MAVEN 编译打包时报“.....找不到符号” 的处理方法总结
- Maven 错误找不到符号
- maven 找不到符号
- 解决maven编译错误:程序包com.sun.xml.internal.ws.spi不存在
- Maven编译时出现com.sun.xml.internal.bind.marshaller包不存在问题
- JAVA 编译找不到符号
- android 编译找不到符号
- JAVA编译找不到符号
- 新版架构图详解和旧版比较
- SVN 配置的几个问题
- 提高软件质量的几大法宝
- 多显示器编程--获取所有显示器的分辨率
- 研一(下) 新学期新规划
- maven编译找不到符号 sun.org.mozilla.javascript.internal
- Android 带checkbox的listView 实现多选,全选,反选
- 原iOS中的内存管理(下)
- 浏览器jsp、html之间的关系
- KJFrame使用注意项
- 数据结构之栈和队列
- mysql数据库在Navicat Premium连接的时候出现1862错误
- 详解SPI中的极性CPOL和相位CPHA
- Android-使用java代码实现界面