Installation

Installing Applet Runner is like installing a standard IDE plugin.
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
* JetBrains IDE's include IntelliJ IDEA (all editions), Android Studio, PyCharm, PhpStorm, WebStorm, Rider and more

Toolbar

Let's explore the elements of the toolbar.
  • The applet URL: Enter the URL or the file path of the applet.
    Accepted extensions are html, htm, js, jnlp, jar, class and java.
    Local or network files are recommended. If the URL is a http(s) URL files will be first downloaded locally and cached before being started. The first start may be then slower because of the download time and the verification by any local antivirus software.
    If the http(s) URL is not in the bookmarks, a confirmation dialog will be displayed. Only run applets from trusted sources. Insecure http (without the 's') URL are only allowed in Applet Runner Pro.
  • Launch: Launch the applet located in at the address specified in the previous text field. Not that you can also hit 'ENTER' to launch the applet in the text field.
  • Bookmarks: Show the bookmarks. Applet Runner comes with already many bookmarks of applets. The pro version contains many options to manage the bookmarks.
  • Open: Open an applet from a local file.
  • Settings: Open Applet Runner settings window.
  • Other Dropdown: Open a dropdown menu for other possible actions like settings, help, visit website, about window.
    In Applet Runner Pro, it contains also Add panel, Remove panel and Take screenshot.
In About -> System Info you can see the logs of the application. If your applet fails to start you may find the reason why there.
The pro version contains many options to customize the toolbar, including hiding the toolbar, start-up url, hide text field, bookmarks or some buttons.

Settings

Let's explore the elements of the settings window.
  • General: define the location of the settings (saved preferences) file.
    If the application is started as a standalone application (pro version only), you can also choose the aspect of the application (and applet)
  • Main Window: Only available in the standalone application. Specify window option like keep always on top of other window, show window translucent and define size and location of the main window.
  • Input Fields: Manage history of the different input fields of the application
  • Language: Useful to translate the application in other languages.
  • Connection: In case firewall in your company, specify any proxy there. Also specify when it should check for update and the statistics status.
  • Feedback: Any new ideas or improvements for this software, fill in the form. No reply guaranteed.
  • Applet Cache: For http(s) url used. View the cached file in the default file browser and clear the cache for example to force downloading a new version.
  • Bookmarks: (pro version only) Manage bookmarks.
    Specify a start-up URL or file
    Show/hide Japplis bookmarks
    Specify a file for extra bookmarks. For example a file on a shared network drive.
    Example of extra bookmark file content:
    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
                  
  • Parameters: (pro version only) Allow to change the default applet parameters.
    Allow query string to override parameters. e.g. https://intranet.company.com/applets/applet1.html?Departement=Marketing will override the default departement applet param. Replace applet parameters with system values can replace applet values with system value like <param name="username">$System.user.name</param> will replace the value with <param name="username">johndoe</param>
  • Toolbar: (pro version only) Decide what to show/hide in the toolbar

Applet

To create an applet, create a class that extends the JApplet class.
Then create for example a HTML file or a JNLP file to point to your code.

Control the IDE with the Applet

This is only available in the pro version.
There are different ways to communicate between the IDE and the Applet:
  • Receive a notification when an event happened, like a file has been opened.
  • Send a event, like ask the IDE to open a file.
  • Get information about the IDE, like the list of opened files.
To receive events, use (J)Applet.addPropertyChangeListener with the property your want to listen to.
To send events, use (J)Applet.firePropertyChange with the property your want to perform.
If the firePropertyChange is not accessible (some are not), use (J)Applet.#getPropertyChangeListeners(String) then loop through the listeners and call the propertyChangeEvent method.
To get IDE information, use JApplet.getRootPane.getClientProperty with the property your want to get the information from.
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.

Distribute

Distributing your software inside or outside your company is just by getting colleagues to install the plugin and go to the applet URL or file that you have created.
Note that the width and height attributes won't be used as the applet will try to fit the size of the plugin.

File Opening

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 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.

Troubleshooting

If you experience any issue with the running applet, I would advice to look at the logs of Applet Runner in the drop down -> About -> System Info. If the problem persist and is not always reproducible, I would advice to try to restart the IDE.