Running EJS
It is very easy to start EJS.
- For Windows or Mac OS, put a shortcut on the Desktop to the file “EjsConsole.jar”, which is in the folder/directory “EJS_X.X” where you unpacked the package. Double-clicking the shortcut will start EJS. You can also choose to simply double-click directly the “EjsConsole.jar” file in the “EJS_X.X” folder/directory.
- Linux/Unix systems interpret the file “EjsConsole.jar” as an archive file. Thus, double-clicking “EjsConsole.jar” will not make EJS start. There are two ways to start EJS under Linux/Unix:
- From a terminal window (“command line”): Go to the directory that contains the archive file “EjsConsole.jar”, and enter the command “java -jar EjsConsole.jar”.
- From an icon on the desktop: You will need to create a new “Link to Application”; the application (“Command”) is “java -jar $pathname/EjsConsole.jar” [where $pathname is the full path of the directory where “EjsConsole.jar” resides], and the work location (“Work path”) is $pathname (otherwise EJS will not know how to find its support directories). So, for example, if you unpacked EJS on your Desktop, thereby creating a new directory “EJS_4.0”, the “Command” is “java -jar ~/Desktop/EJS_4.0/EjsConsole.jar” and the “Work path” is “~/Desktop/EJS_4.0”.
When EJS starts, it will open [at least] two windows:
- The EJS editing window (see image below), which has three radio buttons at the top: “Description”, “Model”, and “View”.
- If you were previously working on a simulation and the console is configured to load the last simulation file, the windows of the view of that simulation may also be opened at the time that the editing window starts.
- Finally, note that during the process of starting EJS, a temporary progress dialog will also be open for a short time.
When you are done with your EJS session, the most orderly way to end it is to close the editing window in the standard way for your operating system. You will be asked to confirm that you are quitting. Other termination methods may be less graceful (i.e. may not completely save the state of EJS for a future session). If you have not saved your most recent changes to the simulation, you will be asked if you want to do so.
You can launch a second or more copies of EJS, if you wish so. For this, use the “Launch Easy Java Simulations” or “Launch EJS” buttons of the EJS console. It is not recommended to re-run EJS by double-clicking the “EjsConsole.jar” again while the console is running. Actually, EJS will prompt you about that if you try to.
The console cannot be closed directly. It will close automatically when the last copy of EJS is closed.