Recent Changes - Search:

Information

Installation

Documentation

 

'Exporting website with applets' EJS menu option

When you use this option, EJS asks for a name for the index HTML file. EJS will then 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 knowledgeable HTML user can easily edit the EJS generated HTML files to create customized web pages. Applets created with EJS support a number of predefined parameters. But it is IMPORTANT that you copy ALL files in the “.files” directory in it. In particular, simulations packaged this way require some of the files in the ejs_library.

 

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.

 

Finally, if you want to create applets which use an absolutely independent (i.e. self-contained) JAR file, then use the “Package current simulation” in EJS packaging menu. EJS will then place everything this simulation needs inside a single JAR. To get a valid HTML page for the applet, run the resulting JAR and use the “Create HTML page” in the simulation’s menu. You can also do this for a multi-simulation JAR file.


Edit - History - Print - Recent Changes - Search
Page last modified on December 10, 2009, at 08:45 PM