Author Topic: Ejs Open Source Earth and Moon Model  (Read 32950 times)

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1772
  • http://weelookang.blogspot.com
    • lookang web
Ejs Open Source Earth and Moon Model
« on: June 15, 2010, 10:23:37 pm »
Ejs Open Source Earth and Moon Model is by Professor Francisco Esquembre aka Paco. I did not make this, i just post it here since the main website cannot deploy the applet properly.
This model is not an accurate model yet, it aims to demonstrate the new features available to Ejs as mentioned during MPLT14 http://www.fisica.uniud.it/URDF/mptl14/contents.htm
the 3D java ready!!
 i went to Prof Paco's wiki it didn't load. http://www.um.es/fem/EjsWiki/Main/ExamplesEarthAndMoon3D properly so i uploaded this version which works!

need
Download Java 3D 1.5.1 for Windows
Java 3D 1.5.1
java3d-1_5_1-windows-i586.exe   2.95 MB

seems to work only as a standalone, web does not display Java 3D

Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
  • Please feel free to post your ideas about how to use the simulation for better teaching and learning.
  • Post questions to be asked to help students to think, to explore.
  • Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!
« Last Edit: June 18, 2010, 10:01:22 am by lookang »

ahmedelshfie

  • Hero Member
  • Posts: 930
Re: Ejs Open Source Earth and Moon Model
« Reply #1 on: June 16, 2010, 12:49:02 am »
I download java 3d and simulation work very well i like idea so much
Very good idea of simulation  ;)

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
Re: Ejs Open Source Earth and Moon Model
« Reply #2 on: June 16, 2010, 07:27:26 am »
The error seem to be Caused by:
java.security.AccessControlException: access denied (java.util.PropertyPermission j3d.stereo read)

May be Paco knew how to solve it?

ahmedelshfie

  • Hero Member
  • Posts: 930
Re: Ejs Open Source Earth and Moon Model
« Reply #3 on: June 16, 2010, 07:38:05 am »
When i download java 3d simulation jar file work very well but have error that prof Hwnag
Saying and because it EJS cant run XML source code i search alto about name this error in XML
But no found I'm wonder how have error about variable not exist in XML source code.
« Last Edit: June 16, 2010, 07:39:45 am by ahmedelshfie »

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1772
  • http://weelookang.blogspot.com
    • lookang web
Re: Ejs Open Source Earth and Moon Model
« Reply #4 on: June 16, 2010, 08:45:42 am »
The error seem to be Caused by:
java.security.AccessControlException: access denied (java.util.PropertyPermission j3d.stereo read)
May be Paco knew how to solve it?

That's the best. I email him now

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
Re: Ejs Open Source Earth and Moon Model
« Reply #5 on: June 16, 2010, 10:25:32 am »
I tried to change java.policy file without success.
And I can view java3D applet from other web site, so it is something implemented in EJS which need more security protection.

fem@um.es

  • Newbie
  • Posts: 5
Re: Ejs Open Source Earth and Moon Model
« Reply #6 on: June 16, 2010, 02:12:09 pm »
Thanks for pointing out this problem. It does look like a security issue. We'll investigate it.
Paco

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1772
  • http://weelookang.blogspot.com
    • lookang web
Re: Ejs Open Source Earth and Moon Model
« Reply #7 on: June 17, 2010, 01:18:50 pm »
did someone do something?
it works on Web deployment now! it looks great.
Prof Hwang?
« Last Edit: June 17, 2010, 01:20:21 pm by lookang »

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
Re: Ejs Open Source Earth and Moon Model
« Reply #8 on: June 17, 2010, 02:39:10 pm »
It is not working with my browser (IE and firefox). The same error message!
Did you change something in your system?

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1772
  • http://weelookang.blogspot.com
    • lookang web
Re: Ejs Open Source Earth and Moon Model
« Reply #9 on: June 17, 2010, 03:00:42 pm »
oic, it was me.
permission java.util.PropertyPermission "j3d.stereo", "read"; // added by lookang

add this line to C:Program FilesJavajre1.5.0_16libsecurityjava.policy
i added at the bottom of the codes

and if that didn't work

add the same line to C:Program FilesJavajre6libsecurityjava.policy
i think this is the solution to the 3D java

i used Jedit to edit them


method 2:
1 download the attachment java.zip
2 unzip the file, it is called java.policy
3 copy file into C:Program FilesJavajre6libsecurityjava.policy
3.5 optional* rename java.policy into java.policy~ in case you want the old file back
4 say yes to copy and replace file depending on whether it is replace or just copy new


BOOM! Java 3D on Ejs Web applets ;D ;D
attached is the java.policy for windows xp system

Youtube to show the steps
« Last Edit: July 17, 2010, 10:54:43 am by lookang »

Fu-Kwun Hwang

  • Administrator
  • Hero Member
  • *****
  • Posts: 3062
    • Enjoy the fun of physics with simulations
Re: Ejs Open Source Earth and Moon Model
« Reply #10 on: June 17, 2010, 05:52:46 pm »
I did the same change for more than 3 different computers. However, it is not working for my computers.

ahmedelshfie

  • Hero Member
  • Posts: 930
Re: Ejs Open Source Earth and Moon Model
« Reply #11 on: June 17, 2010, 06:50:53 pm »
I did the same steps but not loading java 3d error
I test on Firefox,Internet Explorer,IE Tester,Opera
Not loading error all time

ahmedelshfie

  • Hero Member
  • Posts: 930
Re: Ejs Open Source Earth and Moon Model
« Reply #12 on: June 17, 2010, 07:02:17 pm »
Yes now is work after i replace java.policy
On C:Program FilesJavajre6libsecurityjava.policy
Now is loading very well in first 5 Minuit's no loading and it let me think that will not work
But i test again and work very well is work on all my browser(Firefox,IE tester,opera,Internet Explorer)
Good job prof Lookang :D
Just one thing i try running XML file on EJS but error still now
variable IMPLEMENTATION_mode
location: class org.opensourcephysics.display3d.factory.OSP3DFactory
   org.opensourcephysics.display3d.factory.OSP3DFactory.setImplementation (org.opensourcephysics.display3d.factory.OSP3DFactory.IMPLEMENTATION_mode);
   ^
« Last Edit: June 17, 2010, 07:12:15 pm by ahmedelshfie »

lookang

  • Moderator
  • Hero Member
  • *****
  • Posts: 1772
  • http://weelookang.blogspot.com
    • lookang web
Re: Ejs Open Source Earth and Moon Model
« Reply #13 on: June 17, 2010, 07:37:17 pm »
thx ahmedelshfie.! yes the first method works best, 2nd method assumes your PC is windows xp

copy the line
permission java.util.PropertyPermission "j3d.stereo", "read"; // added by lookang

into the exisiting java.policy

i did it on a windows 7 system too by doing this.

copy out java.policy to a space where u can edit and save the new java.policy say d:/

add the line of code at the bottom of the page of java.policy

for windows 7 it looks like this, different from windows xp

// Standard extensions get all permissions by default

grant codeBase "file:${{java.ext.dirs}}/*" {
permission java.security.AllPermission;
};

// default permissions granted to all domains

grant {
// Allows any thread to stop itself using the java.lang.Thread.stop()
// method that takes no argument.
// Note that this permission is granted by default only to remain
// backwards compatible.
// It is strongly recommended that you either remove this permission
// from this policy file or further restrict it to code sources
// that you specify, because Thread.stop() is potentially unsafe.
// See "http://java.sun.com/notes" for more information.
permission java.lang.RuntimePermission "stopThread";

// allows anyone to listen on un-privileged ports
permission java.net.SocketPermission "localhost:1024-", "listen";

// "standard" properies that can be read by anyone

permission java.util.PropertyPermission "java.version", "read";
permission java.util.PropertyPermission "java.vendor", "read";
permission java.util.PropertyPermission "java.vendor.url", "read";
permission java.util.PropertyPermission "java.class.version", "read";
permission java.util.PropertyPermission "os.name", "read";
permission java.util.PropertyPermission "os.version", "read";
permission java.util.PropertyPermission "os.arch", "read";
permission java.util.PropertyPermission "file.separator", "read";
permission java.util.PropertyPermission "path.separator", "read";
permission java.util.PropertyPermission "line.separator", "read";

permission java.util.PropertyPermission "java.specification.version", "read";
permission java.util.PropertyPermission "java.specification.vendor", "read";
permission java.util.PropertyPermission "java.specification.name", "read";

permission java.util.PropertyPermission "java.vm.specification.version", "read";
permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
permission java.util.PropertyPermission "java.vm.specification.name", "read";
permission java.util.PropertyPermission "java.vm.version", "read";
permission java.util.PropertyPermission "java.vm.vendor", "read";
permission java.util.PropertyPermission "java.vm.name", "read";
permission java.util.PropertyPermission "j3d.stereo", "read"; // added by lookang
};

rename the old java.policy from C:Program Files (x86)Javajre6libsecurity to say java~.policy

copy back the file which has the new added line as C:Program Files (x86)Javajre6libsecurity to say java.policy

it works again!
attached in the java.policy for windows 7 system
« Last Edit: June 17, 2010, 07:41:05 pm by lookang »

ahmedelshfie

  • Hero Member
  • Posts: 930
Re: Ejs Open Source Earth and Moon Model
« Reply #14 on: June 17, 2010, 07:53:36 pm »
I really do it but XML source code have wrong.Ejs cant running XML so i try solve but i don't find variable
That have wrong on XML file i notice a thing earth and moon 3d created by ejs version 4.3.0 and I'm use
Version 4.2.7 may this problem for cant run XML source code .