运行从NetBeans中的Java小程序? [英] Running a java applet from netbeans?

查看:776
本文介绍了运行从NetBeans中的Java小程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图运行的NetBeans Java小程序,并尝试运行它,我得到一个主类未找到的错误。我可以通过做SHIFT + F6避免这种情况,但如果我目前的主类写一个只会工作。我将致力于有点大项目,这将有多个文件,并最终将是非常麻烦总是导航回到主类,以主文件,并从那里运行它。是否有任何形式的配置,我可以编辑告诉我要运行我的项目(​​而不是单个文件)作为一个applet的NetBeans?
我从设立的NetBeans本教程

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.

推荐答案

在NetBeans中,右键单击该项目,并选择属性。在应用程序> Webstart的,有一个选项Applet类。指定主类的完整路径(即带包名)。

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).

这篇关于运行从NetBeans中的Java小程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆