netbeans java,运行从NetBeans中的Java小程序?

在NetBeans中遇到运行Java applet时找不到主类的问题。解决方法是右键点击项目选择属性,在应用程序>Web启动选项下设置Applet类,输入主类的全路径(包括包名)。这样可以避免每次都需要回到主类文件运行。
摘要由CSDN通过智能技术生成

I am trying to run a Java applet from NetBeans, and in trying to run it, I get a 'main class not found' error. I can avoid this by doing SHIFT+F6, but that'll only work if I am currently writing in the main class. I will be working on a somewhat large project, and it's going to have multiple files, and eventually it will be quite cumbersome to always navigate back to the main class to the 'main' file and run it from there. Is there any sort of configurations I can edit to tell NetBeans that I want to run my project (not the individual file) as an applet?

I have NetBeans set up from this tutorial.

解决方案

In netbeans, right click on the project and chose properties. Under Application > Webstart, there is an option Applet class. specify the full path to your main class (i.e with package names).

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值