IDE | Install | Run |
---|---|---|
JetBrains IDE's * | File -> Settings -> Plugins -> Marketplace -> Applet Runner -> Install | Tools -> Applet Runner |
Eclipse | Go to Eclipse Marketplace and click the Install button | Search icon on the top right side () of the toolbar or Ctrl+3 -> Applet Runner |
NetBeans | Download from NetBeans Portal, then Tools -> Plugins -> Downloaded -> Add Plugins... -> Select file -> Install | Window -> IDE Tools -> Applet Runner |
Bookmarks>0=Sub folder Bookmarks>1=Applet Name=https://intranet.company.com/applets/test.html Bookmarks>Sub folder>0=Applet1=https://intranet.company.com/applets/applet1.html
Property Name | Description | Example |
---|---|---|
AppletRunnerPro | true if run by the pro version of Applet runner | |
Please contact info@japplis.com for which IDE info/event you would like to use | e.g. event ide.files.opened=c:\myproject\src\com\mypackage\MyProject.java when MyProject.java is opened. |
Applet Runner provides a way to run applications that don't extends (J)Applet.
The application requires a class that extends JComponent or JRootPane or RootPaneContainer (like JFrame).
If not, it should have a public method that returns a JComponent, JRootPane or a RootPaneContainer.
As code attribute of the applet pass com.japplis.appletrunner.applets.SwingApplet and fills the following applet parameters
Parameter Name | Required | Description | Example |
---|---|---|---|
SwingClass | Yes | The class that provides the Swing element to show | com.mycompany.MyFrame |
SwingMethod | No | The method in the class that provides the Swing element to show | getMainPanel |
Args | No | A comma separated list of arguments to pass to the constructor or method Note that either the constructor or method should have String[] args as parameter. |
1,2,3 |
<applet code="com.japplis.appletrunner.applets.SwingApplet" codebase="build/classes" width="400" height="100"> <param name="SwingClass" value="TestCustomSlider"> <param name="SwingMethod" value="getMainFrame"> </applet>
Applet Runner provides a way to run one JavaFX application.
Note that only non-modular applications (jars) are supported and the javafx-swing library should be included in the archive.
Note also that due to technical reasons, it's only possible to load one application and only once
As code attribute of the applet pass com.japplis.appletrunner.applets.JavaFXApplet and fills the following applet parameters
There are 2 ways to start the application: if ApplicationClass is only provided, Applet Runner will create the object and call init and start.
If you prefer Application.launch(args)
to be use, static methods ApplicationMethod and ApplicationStage needs to provided.
Note that when the applet is closed Application.stop()
is called, so if that method calls Platform.exit()
or System.exit()
, this may result in problems.
Parameter Name | Required | Description | Example |
---|---|---|---|
ApplicationClass | Yes | The class that provides the Application | com.mycompany.MyApplication |
ApplicationMethod | No | The name of the public static method returning the Application object. |
getThisApplication |
ApplicationStage | No | The public static method to get the Scene or Stage object from the Application . |
getStage |
Args | No | A comma separated list of arguments to pass to the Application.launch method |
1,2,3 |
<applet code="com.japplis.appletrunner.applets.JavaFXApplet" codebase="shade" archive="hellofx.jar" width="400" height="100"> <param name="ApplicationClass" value="hellofx.HelloFX"> <param name="ApplicationMethod" value="getApplication"> <param name="ApplicationStage" value="getStage"> </applet> public class HelloFX extends Application { private static HelloFX app; private static Stage stage; private boolean doNotCallExit; @Override public void init() { app = this; } @Override public void start(Stage stage) { HelloFX.stage = stage; ... } public static Application getApplication() { app.doNotCallExit = true; // If this method is only called in applet mode return app; } public static Stage getStage() { return stage; } ... }
Applet Runner provides a way to show a JavaFX scene. One of the inconvenient of JavaFXApplet is that a window is appearing for a fraction of a second when starting.
So if you want more control, you can directly give the JavaFX scene that will be included in a JFXPanel that is added to the applet.
Note that only non-modular applications (jars) are supported and the javafx-swing library should be included in the archive.
Note also that due to technical reasons, it's only possible to load one scene and only once
As code attribute of the applet pass com.japplis.appletrunner.applets.SceneApplet and fills the following applet parameters
Parameter Name | Required | Description | Example |
---|---|---|---|
SceneClass | Yes | The class that provides the Scene | com.mycompany.MyScene |
SceneMethod | No | The name of the public method returning the Scene object. |
getMyScene |
Args | No | A comma separated list of arguments to scene class constructor or method |
1,2,3 |
Applet Runner Pro and Ant Commander Pro with Applet Runner panel can not only open files with applets like .html or .jnlp files but in the case the file is not an applet file like .mp3 or .xslx, it will try to locate an applet that can handle this file and open this applet giving the file as a File parameter to the applet.
This can be done by either setting the file location in the applet location field or dropping the file (from the IDE or a file manager) in the tool bar or start-up/welcome panel
If you go in File Opening settings of Applet Runner Pro or in Applet Runner settings for Ant Commander Pro, you can see which applet will be opening to handle which file extension by clicking on the See Defaults button.
The settings allow you to either override an extension with another applet or to define a new applet to handle a new extension. The format to specify it is <extension>=<applet location>.
For example json=https://www.mydomain.com/applet/json-editor.html or xslx=C:\Program Files\Treecell\applet-for-applet-runner.html or hl7=G:\Network\HL7Viewer\webstart.jnlp.
By setting <system> as applet location, it will override the default applet location to open with the OS default application
Note that the specified applet should be able to handle the inject 'File' parameter which will contain the absolute path of the file.
Empty extension can be use to specify which applet to start for directories.