NetBeans 7 Java 在保存大型项目时进行编译
我有一个包含数千个源代码文件的 Java 项目。对于我为其提供 Java 源代码的类,我经常在运行时遇到 ClassNotFoundException。当我禁用“保存时编译”时,我没有遇到此问题,但这是一个有用的功能,我希望启用它。
有没有一种方法可以让我向 NetBeans 表明“我知道您认为这些文件已经编译,但无论如何安排它们进行编译(或者我希望您重新编译它们)”?
I have a Java project with thousands of source code files. I frequently encounter ClassNotFoundExceptions at runtime for classes for which I'm providing Java source code. I do not experience this problem when I disable Compile on Save, but it's a useful feature and I'd like to have it enabled.
Is there a way that I can indicate to NetBeans "I know you think these files are already compiled, but schedule them for compilation (or I want you to re-compile them) anyway"?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
NetBeans 应该在保存文件后对其进行编译;不这样做是一个错误,而不是最终用户应该尝试解决的情况。
但是,可以创建导入 build.xml 并覆盖
-pre-compile-single
的自定义构建脚本来定义要编译的一个或多个源代码文件。NetBeans should compile files once they are saved; failure to do so is a bug and is not a condition an end user should be trying to work around.
However, it is possible to create custom build scripts which import build.xml and override
-pre-compile-single
to define one or more source code files to be compiled.