Recent Changes - Search:

Information

Installation

Documentation

User Feedback

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: 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. When you use this option, EJS asks for a name for the index HTML file. EJS will create this file and a directory with its same name and the “.files” extension where it will place all the files required to run the simulations as applets. Exporting these HTML pages is as simple as to copy the generated HTML index file and the accompanying “.files” directory to the SAME DIRECTORY of your web server. A knowledgable HTML user can easily edit the EJS generated HTML files to create customized web pages.
When you chose the target index file, a check box allows you to create the necessary simulation JAR files either self-contained or minimizing their individual size by creating a separate “common.jar” file that contains repeated library files. The second option is recommended (because it minimizes download times) when you are publishing a finished web site that will not add new simulations to it. This is because the “common.jar” file varies if you change the simulations on the site and will not be compatible. If you change the simulations, you will need to rebuild the site for all the simulations involved. The option of self-contained JARs creates larger individual JAR files, but they are independent from each other.
It is important to know that Java applets are run by web browsers under security restrictions to protect the user. This implies, for instance, that a normal Java applet cannot access the computer hard disk. For a Java applet to be able to read from or write to the hard disk (as well as to perform other actions) you must “sign the applet”. Google for this sentence to learn what this means and how to sign an applet.

 

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

 

Edit - History - Print - Recent Changes - Search
Page last modified on April 29, 2009, at 12:11 AM