当我尝试运行 ant 文件时,由于以下原因,构建将失败:
[projectBuild] null DN Jaxb Beans:Multiple output locations are disabled, cannot associate entry: 'DN Jaxb Beans/src' with a specific output.
[projectBuild] null DN Jaxb Beans:Unbound classpath container: 'JRE System Library [J2SE-1.5]'.
[projectBuild] null DN Jaxb Beans:Unbound classpath container: 'org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER'.
[projectBuild] null DN Jaxb Beans:Multiple output locations are disabled, cannot associate entry: 'DN Jaxb Beans/src' with a specific output.
[projectBuild] null DN Jaxb Beans:The project was not built since its classpath is incomplete. Cannot find the class file for java.lang.Object. Fix the classpath then try rebuilding this project.
[projectBuild] 1 JAXBVersion.java:This compilation unit indirectly references the missing type java.lang.Object (typically some required class file is referencing a type outside the classpath)
[projectBuild] Errors were detected after building DN Jaxb Beans
[projectBuild] ProjectBuild: DN Jaxb Beans Exception=Errors were detected after building DN Jaxb Beans
[projectBuild] BUILD FAILED: file:C:/workspace.May21/DN Ant Scripts/buildDev.xml:149:
ProjectBuild: DN Jaxb Beans Exception=Errors were detected after building DN Jaxb Beans
Total time: 19 minutes 4 seconds
你能解决这个问题吗?
以下错误是一个很好的指示:
Cannot find the class file for java.lang.Object
如果 java 找不到
java.lang.Object
,则说明您的 java 安装存在配置问题。 消息 JRE System Library [J2SE-1.5]
看起来像 eclipse jre 配置名称,所以我假设您正在通过 eclipse 运行它。 我会尝试删除并添加回 eclipse 中的执行环境配置。
第 1 步:创建您尝试运行的文件的备份。 步骤2:只删除类而不是整个包,只删除最后一个目录。 第 3 步:将文件复制回来。