APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

Can EJS and EJSS be used side by side? post and replies

Return to the Can EJS and EJSS be used side by side? thread
Login to post to this thread

Can EJS and EJSS be used side by side?
Cleon Teunissen
29 Posts

So I've read the descriptions of what EJS 5.3 will do, and what EJSS 6.0 will do.

I'm currently using EJS 5.3  (Java version: JRE 8, Windows 10)
I've created a new simulation: Lagrange Point  
the .zip containing the .ejs file is attached
This simulation still requires finishing touches, but it is functional.

Next step is to port this simulation to EJSS.

Is it possible to use EJS 5.3 and EJSS 6.0 side by side?

The reason I ask:
In Windows, EJS writes two configuration files:
.ejs.txt
.ejs.console.txt

My understanding is that the location where EJS writes those configuration files is hard coded.
So I assume that if I try to use EJS 5.3 and EJSS 6.0 side by side each will overwrite those two configuration files.
Of course, most of the settings will be identical.
Still, one setting is different: whether to generate Java simulation or JS simulation.

Do you have a recommendation?

Attached File: ejs_src_lagrange_point.zip


Replies to Can EJS and EJSS be used side by side?

Re: Can EJS and EJSS be used side by side? -
lookang Avatar
lookang
245 Posts

Hi Cleon, the conversion process can be done on this file EjsS_5.3_190423-beta.zip, i recommend this new ejss editor because it is the latest 2019 ejss5.3, i speculate this version will be improved on instead of the 2018 version on Paco's server. 

https://gitlab.com/ejsS/tool/blob/master/Release/EjsS_5.3_190423-beta.zip

 

 

Attached File: Screenshotfrom20190803224125.png


OSP@SG blog
OSP@SG Digital Library


Re: Can EJS and EJSS be used side by side? -
lookang Avatar
lookang
245 Posts

this is a partially transfered file for the ejss.

you need to write in JavaScript the new functions

double change to var

repopulate the HTMLVIEW elements

i have a tutorial here

https://iwant2study.org/ospsg/index.php/translations/359-re-create-or-convert-ejs-to-ejss

Attached File: ejss_src_lagrange_point.zip


OSP@SG blog
OSP@SG Digital Library


Re: Can EJS and EJSS be used side by side? -
Léo Santos
10 Posts

What a great tutorial, thank you so much, Lookang!!!


Léo Rodrigues Macena dos Santos Departament of Physics - Faculdade de Ciências da Universidade do Porto.


Re: Can EJS and EJSS be used side by side? -
Cleon Teunissen
29 Posts

hi Lookang,

thank you for verifying the simulation can be ported, and thank you for the overview of how the porting proceeds. Screenshots are always very helpful!

Since my simulations are very elaborate it's probably less complicated for me to recreate the same simulation from scratch. That way I can test at intermediate points, allowing me to keep track of what I'm doing.

So my preferred workflow would be that I have a source simulation that is completely accessible, and the creating-from-scratch version separate from that.

But it is my understanding that EJS is hardcoded to have only one instance of the EJS console running.

My preferred workflow would be to have two completely separate workspaces, one for EJS and one for EJSS, but it appears that EJS/EJSS is hardcoded against that.

It just occurred to me:
I can set up an instance of EJSS on a separate computer and operate that version of EJSS using remote viewing software. (I'm familiar with Teamviewer, for instance.)

Still, I would prefer running independent instances of EJS and EJSS on the same computer.

Attached:
Newest version of Lagrange point simulation, with many finishing touches

Attached File: ejs_src_lagrange_point1.zip



Re: Can EJS and EJSS be used side by side? -
Francisco Esquembre
237 Posts

Cleon,

EJS can handle separate workspaces. But it will remember the workspace you were working on last.

Versions of EJS share the hidden info files so that upgrading from one version to the next would be transparent to the average user.

But I will think about the possibility, yes.

Paco



Re: Can EJS and EJSS be used side by side? -
Francisco Esquembre
237 Posts

Hi Cleon,
Yes. You can use them side by side, though in principle one should use only one. If I remember well, the main information stored in those hidden files that can bother you a bit is the last simulation opened. (It will change depending on which version of EJS you close last.) But, if you uncheck the "Load last file" option, that won't be a problem.

As you know, EJSS 6 is the evolution of EJS to support ONLY JavaScript simulations. The reason is that Java evolved to version 10 and some features of it "broke" how EJS JARs simulation files in Java. Hence, we decided to split the Java and Javascript versions of EJS. If you use the Java version, you'll need top stock to Java 8. If not, you can move to Java 10 (and beyond).

Paco



Re: Can EJS and EJSS be used side by side? -
Cleon Teunissen
29 Posts

Hi Paco,

(funny thing: you are referring to the configuration files as
'hidden info files'. I'm like: what do you mean hidden? Then it
dawned on me: in Unix environment there is that convention that if
the filename starts with a dot then the OS is supposed to treat
that file as hidden. But on Windows that file isn't hidden.)


I appreciate the problem:
All software needs to have a way of preserving state during
off-time; the time between the software being closed and opened
again. Users expect that continuity.

The location where to look for the configuration file has to be
hard coded.

That is why, I presume, that in the case of software that is also
available in portable form that portable version is a distinct
version. (The portable version looks for the configuration file in
the same directory as where it resides itself.)

So yeah, how do you straddle the transitional period.


To be clear: alternating between EJS and EJSS doesn't cut it for
me. I'm looking for a solution to have EJS and EJSS simultaneously
available, fully functional, including the 'View' tab.



Re: Can EJS and EJSS be used side by side? -
Cleon Teunissen
29 Posts

Hang on, I think I may have misunderstood.

The EJS console has several pull-down menus, the bottom one is a pull-down menu
for selecting either Java or Javascript.

The following had not occurred to me, so I just tried it.
- When I start the EJS console it automatically starts an instance of EJS
- I use the pull-down menu to change to the setting to 'Javascript'.
- I click the 'launch' button, starting a second instance of EJS, and this second instance
is EJSS

Looking back:
I had blindly assumed that the EJS console would not allow a Java-instance and a
Javascript-instance to co-exist. I had blndly assumed that if you have multiple
instances they must either be all EJS-instances or all EJSS-instances

Feature request:
Add an option in EJSS 6 to start a read-only instance of Java-EJS



Re: Can EJS and EJSS be used side by side? -
Francisco Esquembre
237 Posts

Oh. I see. Yes, EJS 5.3 can show, at the same time a JS and a Java instances of EJS 5.3

I thought you wanted to have a 5.3 Java EJS and a 6.0 JS EJS... which is also possible, but have these small conflicts.

Paco

PS: I cannot have EJS 6.0 open a EJS 5.3 because EJS will work with any latest Java, ut 5.3 will require Java 8... which may not be installed



Re: Can EJS and EJSS be used side by side? -
Cleon Teunissen
29 Posts

Ah, so I checked that too (using an EJS 5.0 console and an EJS 5.3 console)

The EJS console does let me start another console instance, but there's a warning:
"An instance of the EJS console is already running.
Do you want to run a second instance of the EJS console?"

I'm not using Java for anything else, so in my case I can keep Java 8.



OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book