NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

Information about this web site => Physlet builder (Create your own simulation) => Topic started by: smaharoof on July 25, 2012, 12:46:53 am



Title: Publishing the Simulation
Post by: smaharoof on July 25, 2012, 12:46:53 am
Hello,

I have a few simulations that I need to display on a website. I used the option 'export website with applets'. The html file that was created has the typical look. But the simulation window does not show under  the slogan "The simulation's view should appear right under this line:". I can not figure out the reason why. Do you have any solution to this? Thanks in advance.

smaharoof



Title: Re: Publishing the Simulation
Post by: Fu-Kwun Hwang on July 25, 2012, 09:33:22 am
You ight want to re-install java run time.

Or unzip all the files that were created and upload as attached file so that I can check it.


Title: Re: Publishing the Simulation
Post by: smaharoof on July 25, 2012, 06:19:31 pm
ok, I downloaded the latest java (jre7). Now I can see the simulation on a web page. But, now I have another problem.
When I try to run the same simulation within EJS console, it produces a compilation error as follows:

Compilation produced an error!
Generating simulation file Pend……
C:\Users\Umar\Documents\A_Sithy\SithyJava\EJS_4.1\workspace\output\users\Sithy\Pendulum.java:19: cannot access java.lang.Object
bad class file: C:\Program Files\Java\jre7\lib\rt.jar(java/lang/Object.class)
class file has wrong version 51.0, should be 49.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
public class Pendulum extends org.colos.ejs.library.AbstractModel {
       ^ 


It is caused by the new installation. How do I go about fixing this. Any help would be appreciated. I have several simulation files. I want to edit them and run them within the EJS console and eventually package it to display on a website.

Thank you for your expertise.

Sithy


Title: Re: Publishing the Simulation
Post by: Fu-Kwun Hwang on July 25, 2012, 07:00:06 pm
It might be due to that your EJS was old version and you installed java with newer version.

Please go to http://www.um.es/fem/EjsWiki/Main/Download
and download latest version ejs

Then, open your files with latest version EJS. I think it might solve the problem.

Normally, I create workspace under root e.g. c:\workspace  instead under ejs installed directory.
Then, you do not need to move source file from one version to another version.


Title: Re: Publishing the Simulation
Post by: lapenkanwa on October 01, 2012, 04:05:39 pm
 ;D ;D ;D


Title: Re: Publishing the Simulation
Post by: lookang on October 01, 2012, 07:52:57 pm
I solved this problem by reinstalling all previous versions of jre, jdk, and other java stuff.
Then install only one version of jre.
Some ejs 4.3.0-4.3.5 have this problem with version 49 instead of 51.
The latest ejs 4.3.7 should be fine
Good luck!