tags:

views:

78

answers:

5

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.

A: 

Run appletviewer [ options ] urls ...

Documentation

stacker
+1  A: 

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.

aioobe
+1  A: 

Build a subclass, which implements main-method, and call init(), start(), stop(), destroy as needed.

springfeld
A: 

If you use eclipse: Right-Click on your main java file (the one which extends Applet), select the 'Run As' submenu, and select 'Applet.

Justin
A: 

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.

BalusC