简体   繁体   English

构建Java项目时出错

[英]Error building java project

I have tryied to build my project in netbeans 6.8/ windows xp, and I've received this errors: 我尝试在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.

The lines are, respectively: 452: 这些行分别是:452:

`<j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>`

224: 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}">

I have tried to reinstall netbeans, java, and anything more...but I can't resolve this error. 我试图重新安装netbeans,java和其他任何内容...但是我无法解决此错误。 Do someone know how can I fix it? 有人知道我该如何解决吗?

All the best! 祝一切顺利!

Leandro 伦德罗

Sometimes, Netbeans screws up the build file generation 有时,Netbeans破坏了生成文件的生成
(generation of build-impl.xml from build.xml ). (从build.xml生成build-impl.xml )。

If may help to remove buid-impl.xml, close project, restart Netbeans, open project. 如果可能有助于删除buid-impl.xml,请关闭项目,重新启动Netbeans,然后打开项目。 But in some cases Netbeans fails to regenerate this file. 但是在某些情况下,Netbeans无法重新生成此文件。

What will help in most cases is: 大多数情况下有帮助的是:

  • Create new project in different location (with same name if you whish); 在不同的位置创建项目(如果愿意,使用相同的名称);
  • Open old and new project; 打开新旧项目;
  • Copy all packages from old project, and paste to new project (try with refactoring, but when fails, try without.); 复制旧项目中的所有软件包,然后粘贴到新项目中(尝试进行重构,但是如果失败,请尝试进行重构。);
  • Adopt manually all project settings from old project into new. 手动采用从旧项目到新项目的所有项目设置。
  • Forget the old project and delete it ;) 忘记旧项目并删除它;)

Ok, it's resolved. 好,解决了。 I haven't seen that one warning was for a library not found. 我还没有看到一个警告是未找到图书馆。 I just give to netbeans that library and my code is compiled well. 我只是给netbeans这个库,我的代码编译得很好。

Sorry guys Leandro. 抱歉,Leandro。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM