Hello guys. I have a problem.
How i can run my java-applet directly without embedded in my web page?
I know appletViewr can execute applet without a browser but I need to get java applet without html page.
Hello guys. I have a problem.
How i can run my java-applet directly without embedded in my web page?
I know appletViewr can execute applet without a browser but I need to get java applet without html page.
Appletviewer is the way to go, BUT, it still requires a webpage with an applet-tag.
An alternative solution is to write a stub class, with a main method, that instantiates the applet, calls init()
, start()
, stop()
and destroy()
as would otherwise have been done by the browser or appletviewer.
Build a subclass, which implements main-method, and call init(), start(), stop(), destroy as needed.
If you use eclipse: Right-Click on your main java file (the one which extends Applet), select the 'Run As' submenu, and select 'Applet.
Another alternative is to just refactor all the UI and logic out of the applet into its own (executabele Swing) class so that you can run it independently and after all just import and instantiate it in the applet.