Recent Changes - Search:

Information

Installation

Documentation

 

Deployment of simulations created with EJS

You can distribute the simulations created with EjsS using the following options of the “Package” icon, , of the task bar:

 

Deployment options are somewhat different for Java and JavaScript simulations.

 

Deploying or distributing individual JavaScript simulations

 

  • Package current simulation. This option creates a self-contained, compressed ZIP file. You just need to distribute this file to your users. To run your simulations your users can:
    • Unzip the file and open the main XHTML file for your model (called something like ModelName.xhtml) in their favorite browser.
    • Open the ZIP file directly using the EjsS Reader Apps (available for Android and iOS).

You can also unzip this file in a web server and make the simulation available on-line.

 

  • 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 EjsS, a simulation. Your colleague can use this ZIP file directly with EjsS. 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 EjsS 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).

 

  • Prepackage for App. EjsS can help you create a native App for Android or iOS. See details here.

 

  • Package as MacOS Widget. This option creates a MacOS Widget for use in MacOS Dashboard or in the iBooks Author software.

 

Deploying or distributing several JavaScript simulations

 

  • Package several simulations: Similar to the Package current simulation above, but you can place several simulations in a single ZIP file.

 

  • ZIP several simulations source files: Similar to ZIP the simulation source files above, but you can place several simulations in a single ZIP file.

 

  • Prepackage for BookApp. EjsS can help you create a native App for Android or iOS containing several simulations. See details here.

 

  • Package for ePUB. EjsS creates a complete ePub electronic book from several of your (previously packaged) simulations.

 

Deploying or distributing individual Java simulations

 

  • Package current simulation: 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.

 

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

 

Deploying or distributing several

 

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

 

  • ZIP several simulations source files: Similar to ‘ZIP the simulation source files, but you can place several simulations in a single ZIP file.

 

  • ‘Package simulations 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.

 



Edit - History - Print - Recent Changes - Search
Page last modified on August 01, 2016, at 01:47 PM