简体   繁体   中英

Netbeans Run project button disabled

I have been working on a project, everything was going smoothly and project has no errors. Last saved project was ok and running smoothly but when I opened same project after 2 days the run project button is disabled, no options are available/enable to run my project.

在此处输入图片说明

in above picture rectangle area in red color where options are disabled. I dont know what should i do, I tried to copy same project and pasted in other location and opened from netbeans.. but still same problem.. How to run this project.. please any one help me out.. thanks

禁用“在保存时编译”并重新启动 Netbeans。

这个问题之前在我身上发生过几次,我曾经重新启动 Netbeans 并且每次都有效。

Based on my experience, this happen when you close Netbeans while there are errors in the code and the compile on save option is working.

To solve this problem, just delete the folder Build from the directory of your project folder, and then start Netbeans .

将鼠标放在项目标题上,然后您将看到阻止项目运行的问题。

如果仍然没有解决,请重新启动 Netbeans,然后创建一个新文件夹,将项目的内容复制到该新创建的文件夹,然后在 netbeans 中打开该新文件夹项目。这应该可以工作。

Right click on project name in "Projects" tab and click on "Clean" menu item. This works for me.

如果您有多个项目需要单击该项目进行选择,那么运行按钮将被启用。

我的问题是由 netbeans 不知道主项目是什么引起的。按下名为运行的按钮(不是绿色运行箭头),然后设置您的哪个项目是主要项目。

我重新启动了 NetBeans IDE,它对我有用

在项目选项卡中,您可以Right-click您的项目并单击clean

我通过保存项目并再次重新启动 Netbeans 来解决它

当main方法没有写对时,这个问题就发生在我身上,public static void main(String args),所以我重新写了一遍,放了方括号,因为我确实忘记了String语句后的方括号。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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