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

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

问题描述

我正在尝试从 NetBeans 运行 Java 小程序,在尝试运行它时,出现未找到主类"错误.我可以通过执行 SHIFT+F6 来避免这种情况,但这只有在我当前在主类中编写时才有效.我将从事一个有点大的项目,它将有多个文件,最终总是导航回主类到主"文件并从那里运行它会非常麻烦.是否有任何类型的配置我可以编辑来告诉 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天全站免登陆