简体   繁体   中英

How can I run a java class as an applet in Eclipse?

How do I run a java class as an applet in Eclipse, I don't want to run the applet in a browser.

I just want to run it in Eclipse with AppletViewer . I have a .class file but it won't run.

In eclipse you shouldn't try to interact directly with the generated files (such as .class files). There's a reason that it hides them from you by default in the most views.

Instead find the .java file which contains the class which extends Applet and go into its "Run As" menu. You should have the option to run it as a "Java Applet".

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