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.

Empty EjsS Emulator in EJS 5.2 post and replies

Return to the Empty EjsS Emulator in EJS 5.2 thread
Login to post to this thread

Empty EjsS Emulator
Mariusz Krasinski
17 Posts

I have installed new EjsS 5.2. After this, my EjsS emulator is empty. I can run simulation in browser but I see nothing during work.
After returning to EjsS 5.1 everything works fine.
I checked all settings but I do not see nothing wrong.
Any hint?


Replies to Empty EjsS Emulator

Re: Empty EjsS Emulator -
John Val
13 Posts

I experienced the same problem with function plotter Example
If you press F12 in the browser (firefox e.g.) you will problably see something like
MAX undefined
_model undefined

I started making a new Simulation on the basis of the old one. It now works fine.


I think the problem is fully caused by the lack of MAX during initialization.
Which is the frames per second field in the evolution Part of the Model interface.
If you set the frames per second rate to another value your problem is probably solved.



Re: Re: Empty EjsS Emulator -
Mariusz Krasinski
17 Posts

Small misunderstanding.

My simulations (old made in 5.1 or older versions and new test made in 5.2) work well in browser. No problem. So simulation is OK.

Problem is that I can not see anything in EjsS emulator during editing (no problem in 5.1) and I do not see working simulation in emulator (and only in emulator).

So I am blind during work. I do not understand what has changed.



Re: Re: Re: Empty EjsS Emulator -
Francisco Esquembre
237 Posts

Hi,

Oracle has released a new Java that breaks the Emulator. We honestly believed this is bug in Oracle's side. Yet, we are working on a (rather sophisticated) alternative way of showing a preview.

The workaround right now is to run EjsS with an older release of Java. This can be done, if you have both the old an new Java, by using the Advanced options tab in EjsS Console (the Console!).

This is what I use in my Mac for the Alternative Java VM an the Emulator of EjsS 5.2 runs perfectly well.

/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre/

Hope to implement the new other way of showing the Preview soon.

Sorry for the inconveniences (although we do not feel very much guilty!)

Paco



Re: Re: Re: Re: Empty EjsS Emulator -
Afrânio Coelho
3 Posts

Dear Paco,

Have you good news about this issue? Problem still continues: EjsS Emulator Preview always shows a blank page. That makes building an simulation view structure slower. Thank you in advance.



Re: Re: Re: Re: Re: Empty EjsS Emulator -
Francisco Esquembre
237 Posts

Hi,

Yes. The newer releases of EjsS offer the possibility (which I use as default) to display the preview using your favourite browser.

Go to the EjsS option pages and select this option.

Paco



Re: Re: Re: Re: Re: Re: Empty EjsS Emulator -
Afrânio Coelho
3 Posts

Dear Paco,

I tried many versions of java for Linux-Ubuntu: gcj, openjdk and oracle. The EjsS javascript Emulator only works with the java7-oracle. Yes, we can see a preview on the browser if you choose "use browser as prefered method..." in the "Run options" tab on "Information" about the EjsS simulation. But we must "play" the simulation every time to see the modifications. But, as you have suggested before, one can install a older version of Java.

So, for whom this issue can concern, here the steps to install in Ubuntu the oracle java version 7::

1. sudo apt-get install python-software-properties
2. sudo add-apt-repository ppa:webupd8team/java
3. sudo apt-get update
4. sudo apt-get install oracle-java7-installer

This will automatically configure java alternatives. To change to a more updated java version, just type:

sudo update-alternatives --config java.

This will change jre default globally. We can choose the oracle java 7 jvm only for EjsS in the "Advanced options" of the EjsS Console.

Thank you!



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