Java applet as a standalone Windows application?
While you can certainly run it, there are subtle differences between how Java works as an application and how it works as an applet. One starts with the init method, the other starts with the main method, and the relationship of the thread and event queue to start is slightly different.
Here are some docs from Sun on how to do this. If you are using JApplet, things change a little, but the idea is the same.
source to share
Java applets usually don't have a main method. They rely on launching a web browser.
It is possible, however, that you are creating a new class that has a main method and a simple call to the init () and start () methods of the applet.
You can take a look at this to better understand the lifecycle of applets.
source to share
I suppose the appletviewer option might be an option. This is a utility included in the JDK .
source to share
If by "applet" you mean a stand-alone shell for a Java program, a simple batch file is sufficient:
@rem MyApp.bat
@echo off
set JVM={{path where java.exe is located}}
set FLAGS={{optional JVM flags}}
set JARFILE={{location of your jarfile}}
%JVM%\java %FLAGS% -cp %JARFILE% {{Package}}.{{Class}} {{args...}}
Replace the items enclosed in curly braces {{...}}
with the appopriate settings for your application. If everything is defined correctly, double-clicking on the package file name in the file explorer window will execute your Java class.
source to share