Start »
Deployment of simulations created with EJS Deployment of simulations created with EJS
You can distribute the simulations created with EJS using the following options of the “Package” icon,
, of the task bar:
- Package current simulation only: This option creates a self-executable, self-contained, compressed JAR file. You just need to distribute this file to your users and they run it by double-clicking it. Of course, your users need to have the Java runtime environment (JRE) installed in their system.
The exported simulation has some
menu options that can be used by your final users to, among other things, extract the model of the simulation and work with it using EJS (if they have EJS installed in their computers). You and your users can also
localize a simulation, i.e. have its user interface translated to different languages.
- Package several simulations: Similar to the previous one, but you can place several simulations in a single JAR file. When the user double-clicks on this file, a dialog appears that allows him/her to choose one of the simulations in it. A good reason for creating such a multi-simulations file is that a second simulation typically contributes a small number of KBs to a single model JAR file. Hence, if you create a web site with several simulations in applet form, downloading the JAR for the first applet does all the network traffic required to run all the other applets at a reasonable traffic/benefit rate.
- ‘Package simulation in Launcher’: This option allows you to create a so-called Launcher package. A Launcher package is a self-executable, self-contained, compressed JAR file with several ready-to-run simulations created with EJS. The launcher provides a nice interface to display the simulations descriptions and a navigation menu to organize the simulations in categories and run them. The image below shows a sample Launcher package. Existing packages can be edited to reorganize them (using its own menu) or rebuilt with EJS to add new simulations to it or to update the library inside.
- Export web site with applets: This option creates a set of HTML files which allow to publish several simulations created with EJS as applets. See detailed discussion here.
- ZIP the simulation source files: This option creates a compressed ZIP file with all the files that your simulation uses. This is the option of choice if you want to send a colleague who also uses EJS a simulation. The resulting ZIP file is usually a few KB.
For this option to work correctly, you need to place any auxiliary file (such as GIF images) used by your simulation in the same directory as the source XML file or in a subdirectory of it, and refer relatively to the file in the EJS code. I.e., with its name starting by ‘./’. (As in ‘./MyImage.gif’ or ‘./ASubdirectory/MyImage.gif’.) EJS always refers relatively to files correctly located (i.e. under the same directory as the XML file).