NetBeans 可以自动构建 java 自由格式 (Ant) 项目吗?

编程入门 行业动态 更新时间:2024-10-28 10:21:39
本文介绍了NetBeans 可以自动构建 java 自由格式 (Ant) 项目吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

每次保存后,我需要在项目浏览器中右键单击该项目,然后单击build.有没有办法在我保存文件时配置 NetBeans 以自动构建项目?

After every save I need to right-click on the project in the project browser and click on build. Is there a way to configure NetBeans to auto-build the project when I save a file?

推荐答案

自 NetBeans 8.0 版起,保存时编译选项不适用于自由格式项目.而且我认为将来也不会提供它.自由格式的想法是,IDE 对您的项目一无所知,完全依赖于您提供的 ant 脚本和映射.

The compile on save option is not available for free-form projects as of NetBeans version 8.0. And I don't think it will be made available in future too. The very idea of free-form is that that IDE does not know anything about your project and completely relies on the ant-scripts and the mappings you provide.

如果不想每次修改文件时都构建整个项目,可以在ant中创建一个target来编译单个文件,并将其映射到IDE命令compile.single.如果需要,您可以为此添加上下文菜单,尽管现有的键盘快捷键 F9 应该足够了.

If you don't want to build an entire project every time you make changes to a file, create a target in ant to compile a single file and map it to the IDE command compile.single. You could add a context menu for that if required, although the existing keyboard shortcut F9 should suffice.

您可以在此处阅读有关高级自由格式配置的更多信息 - 高级自由格式项目配置

You can read more on the advance free-form configuration here - Advanced Free-Form Project Configuration

这篇关于NetBeans 可以自动构建 java 自由格式 (Ant) 项目吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-20 10:11:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/982823.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:可以自动   格式   自由   项目   NetBeans

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!