thmz
Newbie
Offline
Posts: 9
|
 |
«
Embed this message
on: January 27, 2009, 08:37:19 pm » |
|
 Hi. I am having problems running the EJS versions of the software on most of my computers. I am running vista professional (not running) and vista home (running.) All computers use the latest Java download. The download version does not work on any. In all cases, the reported error is a class not found error. For example, for the thick lens simulation, I get this at the console: Java Plug-in 1.6.0_11 Using JRE version 1.6.0_11 Java HotSpot(TM) Client VM User home directory = C:\Users\TM ---------------------------------------------------- ---------------------------------------------------- basic: Starting applet teardown basic: Finished applet teardown basic: Starting applet teardown basic: Finished applet teardown basic: Starting applet teardown basic: Finished applet teardown basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@4204 basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@124111a basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@20f443 basic: Applet loaded. basic: Applet resized and added to parent container basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 229231 us, pluginInit dt 80837119 us, TotalTime: 81066350 us HotEqn V 4.00 HotEqn Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: cHotEqn V 4.01 HotEqn basic: Applet loaded. basic: Applet initialized basic: Removed progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@20f443 basic: Applet made visible basic: Starting applet basic: Applet started basic: Told clients applet is started basic: Applet resized and added to parent container basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 229231 us, pluginInit dt 80852335 us, TotalTime: 81081566 us HotEqn V 4.00 HotEqn Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: Scanner invalid character: cHotEqn V 4.01 HotEqn basic: Applet initialized basic: Removed progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@124111a basic: Applet made visible basic: Starting applet basic: Applet started basic: Told clients applet is started network: Connecting http://www.phy.ntnu.edu.tw/ntnujava/ejs/org/opensourcephysics/ejs/LauncherApplet.class with proxy=DIRECT basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@2ab653 basic: Applet loaded. basic: Applet resized and added to parent container basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 229231 us, pluginInit dt 83423492 us, TotalTime: 83652723 us HotEqn V 4.00 HotEqn Scanner invalid character: Scanner invalid character: Scanner invalid character: cHotEqn V 4.01 HotEqn basic: Applet initialized basic: Removed progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@2ab653 basic: Applet made visible basic: Starting applet basic: Applet started basic: Told clients applet is started network: Connecting http://www.phy.ntnu.edu.tw:80/ with proxy=DIRECT network: Connecting http://www.phy.ntnu.edu.tw/ntnujava/ejs/org/opensourcephysics/ejs/LauncherApplet.class with proxy=DIRECT network: Connecting http://www.phy.ntnu.edu.tw/ntnujava/ejs/opticsLensNMirror/opticsLensNMirrorApplet.class with proxy=DIRECT network: Connecting http://www.phy.ntnu.edu.tw/ntnujava/ejs/opticsLensNMirror/opticsLensNMirrorApplet/class.class with proxy=DIRECT network: Connecting http://www.phy.ntnu.edu.tw/ntnujava/ejs/opticsLensNMirror/opticsLensNMirrorApplet/class.class with proxy=DIRECT basic: load: class opticsLensNMirror.opticsLensNMirrorApplet.class not found. load: class opticsLensNMirror.opticsLensNMirrorApplet.class not found. java.lang.ClassNotFoundException: opticsLensNMirror.opticsLensNMirrorApplet.class at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source) at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: open HTTP connection failed:http://www.phy.ntnu.edu.tw/ntnujava/ejs/opticsLensNMirror/opticsLensNMirrorApplet/class.class at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 7 more Exception: java.lang.ClassNotFoundException: opticsLensNMirror.opticsLensNMirrorApplet.class Ignored exception: java.lang.ClassNotFoundException: opticsLensNMirror.opticsLensNMirrorApplet.class
_____________________________ Thanks for everything. TM
|
|
|
Logged
|
|
|
|
thmz
Newbie
Offline
Posts: 9
|
 |
«
Embed this message
Reply #1 on: January 27, 2009, 09:01:57 pm » |
|
 I wanted to add that I tried it on Windows XP and Server 2003 and had the same class not found issue with the online version and the download.
|
|
|
Logged
|
|
|
|
Fu-Kwun Hwang
|
 |
«
Embed this message
Reply #2 on: January 27, 2009, 09:45:37 pm » |
|
 Are you talking about Lens (thick lens) and Mirror (Please provide URL next time so that it is easier for me to find where might be the problem.) The error message about Scanner invalid character: was coming from another message posted by other user. It is fixed now. Please try it again and let me know the result! Thanks!
|
|
|
Logged
|
|
|
|
thmz
Newbie
Offline
Posts: 9
|
 |
«
Embed this message
Reply #3 on: January 27, 2009, 10:32:04 pm » |
|
 Unfortunately, it is all EJS based applets. I can run EJS jars from Compadre's OSP site without problems. Here is the error from the tigernmirror: [color=blue][tt]basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@113c652 network: Connecting http://www.phy.ntnu.edu.tw/ntnujava/ejs/org/opensourcephysics/ejs/LauncherApplet.class with proxy=DIRECT network: Connecting http://www.phy.ntnu.edu.tw:80/ with proxy=DIRECT network: Connecting http://www.phy.ntnu.edu.tw/ntnujava/ejs/org/opensourcephysics/ejs/LauncherApplet.class with cookie "FKHCookie=a%3A4%3A%7Bi%3A0%3Bs%3A5%3A%2229266%22%3Bi%3A1%3Bs%3A40%3A%22a25f61d2471802083c20a6fb1e81378d3705ba61%22%3Bi%3A2%3Bi%3A1422277432%3Bi%3A3%3Bi%3A1%3B%7D; smfucount=9; ID_MEMBER=29266; PHPSESSID=d0b39196025e1941f8405d9aa5c02f7d" network: Connecting http://www.phy.ntnu.edu.tw/ntnujava/ejs/org/opensourcephysics/ejs/LauncherApplet.class with proxy=DIRECT network: Connecting http://www.phy.ntnu.edu.tw/ntnujava/ejs/org/opensourcephysics/ejs/LauncherApplet.class with cookie "FKHCookie=a%3A4%3A%7Bi%3A0%3Bs%3A5%3A%2229266%22%3Bi%3A1%3Bs%3A40%3A%22a25f61d2471802083c20a6fb1e81378d3705ba61%22%3Bi%3A2%3Bi%3A1422277432%3Bi%3A3%3Bi%3A1%3B%7D; smfucount=9; ID_MEMBER=29266; PHPSESSID=d0b39196025e1941f8405d9aa5c02f7d" network: Connecting http://www.phy.ntnu.edu.tw/ntnujava/ejs/tigerNmirror/tigerNmirrorApplet.class with proxy=DIRECT network: Connecting http://www.phy.ntnu.edu.tw/ntnujava/ejs/tigerNmirror/tigerNmirrorApplet.class with cookie "FKHCookie=a%3A4%3A%7Bi%3A0%3Bs%3A5%3A%2229266%22%3Bi%3A1%3Bs%3A40%3A%22a25f61d2471802083c20a6fb1e81378d3705ba61%22%3Bi%3A2%3Bi%3A1422277432%3Bi%3A3%3Bi%3A1%3B%7D; smfucount=9; ID_MEMBER=29266; PHPSESSID=d0b39196025e1941f8405d9aa5c02f7d" network: Connecting http://www.phy.ntnu.edu.tw/ntnujava/ejs/tigerNmirror/tigerNmirrorApplet/class.class with proxy=DIRECT network: Connecting http://www.phy.ntnu.edu.tw/ntnujava/ejs/tigerNmirror/tigerNmirrorApplet/class.class with cookie "FKHCookie=a%3A4%3A%7Bi%3A0%3Bs%3A5%3A%2229266%22%3Bi%3A1%3Bs%3A40%3A%22a25f61d2471802083c20a6fb1e81378d3705ba61%22%3Bi%3A2%3Bi%3A1422277432%3Bi%3A3%3Bi%3A1%3B%7D; smfucount=9; ID_MEMBER=29266; PHPSESSID=d0b39196025e1941f8405d9aa5c02f7d" network: Connecting http://www.phy.ntnu.edu.tw/ntnujava/ejs/tigerNmirror/tigerNmirrorApplet/class.class with proxy=DIRECT network: Connecting http://www.phy.ntnu.edu.tw/ntnujava/ejs/tigerNmirror/tigerNmirrorApplet/class.class with cookie "FKHCookie=a%3A4%3A%7Bi%3A0%3Bs%3A5%3A%2229266%22%3Bi%3A1%3Bs%3A40%3A%22a25f61d2471802083c20a6fb1e81378d3705ba61%22%3Bi%3A2%3Bi%3A1422277432%3Bi%3A3%3Bi%3A1%3B%7D; smfucount=9; ID_MEMBER=29266; PHPSESSID=d0b39196025e1941f8405d9aa5c02f7d" basic: load: class tigerNmirror.tigerNmirrorApplet.class not found. load: class tigerNmirror.tigerNmirrorApplet.class not found. java.lang.ClassNotFoundException: tigerNmirror.tigerNmirrorApplet.class at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source) at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: open HTTP connection failed:http://www.phy.ntnu.edu.tw/ntnujava/ejs/tigerNmirror/tigerNmirrorApplet/class.class at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 7 more Exception: java.lang.ClassNotFoundException: tigerNmirror.tigerNmirrorApplet.class Ignored exception: java.lang.ClassNotFoundException: tigerNmirror.tigerNmirrorApplet.class[/tt][/color]
Here is the URL: http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=218.0
With another mirror applet, I unpacked the jars and placed them all at the same level as the html. Changed the reference to the jars accordingly. [color=red][u][b]The weird thing is that the ejsBasic jar comes empty (no files in the jar).[/b][/u][/color] I then get this error: [color=blue]basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@4694ef basic: error: org/opensourcephysics/ejs/LauncherApplet. java.lang.NoClassDefFoundError: org/opensourcephysics/ejs/LauncherApplet at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source) at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: org.opensourcephysics.ejs.LauncherApplet at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 10 more Caused by: java.io.FileNotFoundException: C:\Users\Public\Documents\tigerNmirror\org\opensourcephysics\ejs\LauncherApplet.class (The system cannot find the path specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(Unknown Source) at java.io.FileInputStream.(Unknown Source) at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source) at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 14 more Exception: java.lang.NoClassDefFoundError: org/opensourcephysics/ejs/LauncherApplet Ignored exception: java.lang.NoClassDefFoundError: org/opensourcephysics/ejs/LauncherApplet basic: Loading Java Applet Failed...[/color] Thanks for your help and for all the neat physics you have here. Here is the URL: http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=218.0TM
|
|
|
Logged
|
|
|
|
Fu-Kwun Hwang
|
 |
«
Embed this message
Reply #4 on: January 27, 2009, 11:13:53 pm » |
|
 Yes, you are right. The filesize of ejsBasic.jar is zero. I am sorry! I must have done something wrong so that ejsBasic.jar is empty. I just update the file. Please download it again.
|
|
|
Logged
|
|
|
|
thmz
Newbie
Offline
Posts: 9
|
 |
«
Embed this message
Reply #5 on: January 27, 2009, 11:29:19 pm » |
|
 Great thanks, that solves most of the problems. I can now run it online. The download seems to have problems with images. I tried several. The applet runs but without the images. Here is the console message for one: basic: Starting applet teardown basic: Finished applet teardown basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@19c18ae basic: Applet loaded. basic: Applet resized and added to parent container basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 365869 us, pluginInit dt 225201734 us, TotalTime: 225567603 us java.security.AccessControlException: access denied (java.io.FilePermission \C:\Users\Public\Downloads\mirrorHeight (1)\mirrorHeight\_examples\_data\11-cave-man.gif read) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkRead(Unknown Source) at sun.awt.SunToolkit.getImageFromHash(Unknown Source) at sun.awt.SunToolkit.getImage(Unknown Source) at javax.swing.ImageIcon.(Unknown Source) at javax.swing.ImageIcon.(Unknown Source) at org.opensourcephysics.displayejs.utils.Utils.processResource(Utils.java:179) at org.opensourcephysics.displayejs.utils.Utils.resourceObject(Utils.java:234) at org.opensourcephysics.displayejs.utils.Utils.resourceIcon(Utils.java:138) at org.opensourcephysics.ejs.control.displayejs.ControlImage.setImage(ControlImage.java:101) at org.opensourcephysics.ejs.control.displayejs.ControlImage.setValue(ControlImage.java:73) at org.opensourcephysics.ejs.control.GroupVariable.propagateValue(GroupVariable.java:84) at org.opensourcephysics.ejs.control.GroupControl.registerVariable(GroupControl.java:311) at org.opensourcephysics.ejs.control.ControlElement.setProperty(ControlElement.java:490) at org.opensourcephysics.ejs.control.ControlElement.setProperty(ControlElement.java:377) at mirrorHeight.mirrorHeightView.createControl(mirrorHeight.java:1036) at mirrorHeight.mirrorHeightView.(mirrorHeight.java:638) at mirrorHeight.mirrorHeightSimulation.(mirrorHeight.java:612) at mirrorHeight.mirrorHeight.(mirrorHeight.java:46) at mirrorHeight.mirrorHeightApplet.init(mirrorHeightApplet.java:31) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Cache 3: Unable to load resource _examples/_data/11-cave-man.gif java.security.AccessControlException: access denied (java.io.FilePermission \C:\Users\Public\Downloads\mirrorHeight (1)\mirrorHeight\_examples\_data\11-cave-man.gif read) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkRead(Unknown Source) at sun.awt.SunToolkit.getImageFromHash(Unknown Source) at sun.awt.SunToolkit.getImage(Unknown Source) at javax.swing.ImageIcon.(Unknown Source) at javax.swing.ImageIcon.(Unknown Source) at org.opensourcephysics.displayejs.utils.Utils.processResource(Utils.java:179) at org.opensourcephysics.displayejs.utils.Utils.resourceObject(Utils.java:234) at org.opensourcephysics.displayejs.utils.Utils.resourceIcon(Utils.java:138) at org.opensourcephysics.ejs.control.displayejs.ControlImage.setImage(ControlImage.java:101) at org.opensourcephysics.ejs.control.displayejs.ControlImage.setValue(ControlImage.java:73) at org.opensourcephysics.ejs.control.GroupVariable.propagateValue(GroupVariable.java:84) at org.opensourcephysics.ejs.control.GroupControl.registerVariable(GroupControl.java:311) at org.opensourcephysics.ejs.control.ControlElement.setProperty(ControlElement.java:490) at org.opensourcephysics.ejs.control.ControlElement.setProperty(ControlElement.java:377) at mirrorHeight.mirrorHeightView.createControl(mirrorHeight.java:1046) at mirrorHeight.mirrorHeightView.(mirrorHeight.java:638) at mirrorHeight.mirrorHeightSimulation.(mirrorHeight.java:612) at mirrorHeight.mirrorHeight.(mirrorHeight.java:46) at mirrorHeight.mirrorHeightApplet.init(mirrorHeightApplet.java:31) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Cache 3: Unable to load resource _examples/_data/11-cave-man.gif basic: Applet initialized basic: Removed progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@19c18ae basic: Applet made visible basic: Starting applet basic: Applet started basic: Told clients applet is started
Even when the image is in the jar (I did not check all, I checked the one with the tiger walking towards a mirror) is seems unable to read it even though it executes the class files. Thanks for all of your help. TM
|
|
|
Logged
|
|
|
|
Fu-Kwun Hwang
|
 |
«
Embed this message
Reply #6 on: January 28, 2009, 12:25:44 am » |
|
 You can create a subdirectory _data at the same folder as html file. Download the attached gif and put it there if you want to use the previous download version. I have update that applet to EJS version 4. It should work fine if you download again. You can double click downloaded ejs_tigerNmirror.jar and it should run. (EJS version 4 is different from EJS 3, and the distribution files are also different--- jar instead of ZIP). You can generate animated gif from the simulation when running EJS4 applications. You will find many new options available if you Right Click in the simulation region when you run the jar file locally. Enjoy it!
|
|
|
|
thmz
Newbie
Offline
Posts: 9
|
 |
«
Embed this message
Reply #7 on: January 28, 2009, 01:17:59 am » |
|
 Hi and thanks. The folder did not work but the jar worked wonderfully. The folder provided the same error as below. I know that you did a lot for me already today and I don't want to ask you more. If it is easy to implement the jar download for all files, that will be wonderful since all simulations that have images result in the same problem. Thanks and best wishes. TM
|
|
|
Logged
|
|
|
|
Fu-Kwun Hwang
|
 |
«
Embed this message
Reply #8 on: January 28, 2009, 10:31:47 am » |
|
 I found out that the error is due to "access denied". It has something to do with java.policy!
|
|
|
Logged
|
|
|
|
thmz
Newbie
Offline
Posts: 9
|
 |
«
Embed this message
Reply #9 on: January 28, 2009, 08:54:50 pm » |
|
 BTW, happy new year. I should have realized that yesterday. Yes, I figured that it must be something like that. I am using the default policies. I don't know what change needs to be made to get it to work. If easy to implement, the jar version works much better. Thanks for all of your help. TM
|
|
|
Logged
|
|
|
|
Fu-Kwun Hwang
|
 |
«
Embed this message
Reply #10 on: January 28, 2009, 10:18:40 pm » |
|
 Because there are several hundreds simulations at this web site. I need to regenerate the jar file with EJS4 and upload to the server. I will try to do it. But it might take a while! Happy Chinese New Years to you, too!
|
|
|
Logged
|
|
|
|
thmz
Newbie
Offline
Posts: 9
|
 |
«
Embed this message
Reply #11 on: January 29, 2009, 07:30:57 pm » |
|
 Thanks. If there is a way I can (or we can) help, please let me know. TM
|
|
|
Logged
|
|
|
|
Fu-Kwun Hwang
|
 |
«
Embed this message
Reply #12 on: January 29, 2009, 08:30:14 pm » |
|
 I just recompiled all the EJS applets (totally 439 applets) with EJS4 and uploaded them to the server. (I am still running the ftp now.) All the applets shown on the server will be replaced with version EJS 4 when the ftp is done. But there were some error messages when I re-generated the jar files. Please let me know if you found something which is not correctly shown. Thank you!
|
|
|
Logged
|
|
|
|
thmz
Newbie
Offline
Posts: 9
|
 |
«
Embed this message
Reply #13 on: January 31, 2009, 06:50:41 pm » |
|
 Thanks so much. I will do. TM
|
|
|
Logged
|
|
|
|
|