我尝试在 netbeans 6.8/windows xp 中构建我的项目,但收到以下错误:
..\nbproject\build-impl.xml:452: The following error occurred while executing this line:
..\nbproject\build-impl.xml:224: Compile failed; see the compiler error output for details.output for details.
这些行分别是: 452:
`<j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>`
224:
<javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
我尝试重新安装 netbeans、java 等...但无法解决此错误。 有人知道我该如何解决它吗?
祝一切顺利!
莱安德罗
最佳答案
有时,Netbeans 会搞砸构建文件的生成
(从 build.xml
生成 build-impl.xml
)。
如果可能有助于删除 buid-impl.xml,请关闭项目,重新启动 Netbeans,然后打开项目。但在某些情况下,Netbeans 无法重新生成此文件。
在大多数情况中有用的是:
- 在不同位置创建新项目(如果您愿意,可以使用相同的名称);
- 打开新旧项目;
- 复制旧项目中的所有包,然后粘贴到新项目中 (尝试使用重构,但如果失败,请尝试不使用重构。);
- 手动将旧项目中的所有项目设置采用到新项目中。
- 忘记旧项目并将其删除;)
关于java - 构建java项目时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3008390/