From: Philip B. <pb...@sa...> - 2010-06-09 00:43:28
|
Bob: I think I do not understand signed applets, or at least not this one. I set one of my HTML files to call the signed applet. It calls it and gives me the signed applet dialog. As I look at it I have three choices -- run, cancel, or always trust. I understand Run and Always trust. But I assumed that Cancel meant "I'm getting out of here" and nothing would be loaded. However, the signed applet is loaded and everything is fine -- no java exceptions on all browsers. What is Cancel supposed to do? Phil On Jun 8, 2010, at 7:53 PM, Robert Hanson wrote: > OK, THERE IS A WORK-AROUND: > > jmolInitialize.... > jmolSetCallback("UseCommandThread","true") > jmolApplet.... > > As far as I can tell, this brings you back to the old behavior. The JAR files can be anywhere, and the files Jmol reads can be anywhere in or beneath the JAR file directory. For example: > > jmolInitialize('../../test', 'JmolApplet.jar') > jmolSetCallback("UseCommandThread","true") > jmolApplet(400, 'load "../../test/proline_flat.sdf"') > jmolButton('script "../../test/halos.spt"', 'test test2 script file: halos on Hs') > jmolButton('minimize', 'minimize') > > No problem. Comment out that jmolSetCallback line, and we are back to the bad behavior. > > > The notes I have on that read: > > * You can specify that the signed or unsigned applet or application should > * use an independent command thread (EXCEPT for scripts containing the "javascript" command) > * > * [param name="useCommandThread" value="true"] > > I guess that's pretty important now. I'm pretty sure Jmol will detect the Jmol "javascript" command and not try to execute it using that command thread. > > > The way it WAS (only affects the unsigned applet): > > On a web server, as long as the files are somewhere within the domain (usually something like www.stolaf.edu/), they could be anywhere. > > Locally, as long as all the files being read were in the directory containing the JAR files or in a subdirectory of that, that was fine. The HTML page could be anywhere. > > The way it IS NOW: > > No change for the web server. > > Locally, what used to apply only to the JAR files now applies also to the HTML page. > > The minimization /UFF business MUST be a Java bug. That's too weird. It appears that the Javascript thread can't open a resource that is in the Jar file but not within its directory. Huh? Must be a bug! But I will test a bit tonight. > > > > > > Bob > > > > > > > > It appears to me that you are saying I need to move the Stereochemistry.HTML (index file) into the Jmol directory. > > On another issue altogether. There is much emphasis on the Jmol page that the program and applet are named Jmol, not jMol and not jmol. When I download from the downloads page, I get a directory named jmol (all lower case). That seems inconsistent with the specifications. when I first set up the tutorials, I used Jmol and that was, I think what was downloaded. My server is very particular about case and it has caused me headaches when I have not remembered. > > Phil > > On Jun 8, 2010, at 12:57 PM, Robert Hanson wrote: > >> OK, looks like there is a new Firefox security policy: >> >> For all local files accessed via JavaScript, both the JAR file AND the HTML file must be on the path to that file. >> >> Pretty sure that's new. >> >> The fix for me was to move the Jmol-12.... directory into the pages directory, modify the files, and it worked. Of course, this is an EXCEPTIONAL drag!!! Kind of removes the possibility of using the local applet within anything more than a single-directory context. Actually, the solution looks like using this path set: >> >> >> .... /jmol >> .............[all jar files here] >> ............./pages >> .............[html here] >> >> >> This basically makes impossible use of the unsigned applet on a local machine. >> >> >> On Tue, Jun 8, 2010 at 11:29 AM, Robert Hanson <ha...@st...> wrote: >> UFF.txt is a resource within the Jar file. Specifically it is in: >> >> JmolApplet0_Minimize.jar/org/jmol/minimize/forcefield >> >> JmolAppletSigned0_Minimize.jar/org/jmol/minimize/forcefield >> >> >> If you use >> >> set debug >> >> >> you should see its contents listed when the minimizer runs. >> >> Very odd that the system can't find it. This could be an odd threading issue -- the thread that runs from a click of a button is not the same thread that runs when you use the Jmol console or menu. >> >> Local files -- sounds like a Java bug. But I could be doing something slightly wrong there. >> >> Suggestions: >> >> compare application and applet. >> >> >> >> 2010/6/8 Angel Herráez <ang...@ua...> >> >> This is the summary and a test case: >> >> 1. Problem is there only for local files, not from server. Seems to >> be related to Jmol reading text files (either scripts or the UFF.txt >> file embedded somehow inside Jmol) from a folder where the applet >> jars are but the webpage is not. >> >> Main_folder >> | >> -- Pages_folder >> | >> -- mypage.htm >> | >> -- Jmol_folder >> | >> -- *.jar files >> -- Jmol.js >> -- model.mol >> -- test.spt >> >> 2. The problem shows for reading script files (that do no model >> loading, just simple commands) and also for running "minimize" >> >> 3. The same script commands or the minimize command work fine when >> issued from teh script console. It'sonly calling them from a >> jmolButton or an <input type="button" onClick="jmolScript()"> that >> causes the problem. >> >> 4. Same behaviour in 11.6, 11.8.24 and 12.0.RC17 >> >> 5. Errors are like: >> >> For loading a script file: >> >> FileManager opening >> file:/F:/webs/_Proyectos/_pruebas/Jmol_local_scripts/Jmol- >> 12.0.RC17/halos.spt >> script ERROR: script ERROR: >> io error reading >> file:/F:/webs/_Proyectos/_pruebas/Jmol_local_scripts/Jmol- >> 12.0.RC17/halos.spt: >> java.security.AccessControlException: >> access denied (java.io.FilePermission >> F:\webs\_Proyectos\_pruebas\Jmol_local_scripts\Jmol- >> 12.0.RC17\halos.spt read) >> >> >> For running minimize: >> >> Minimizing 17 atoms >> minimize: initializing (steps = 100 criterion = >> 0.0010000000474974513) ... >> minimize: using org.jmol.minimize.forcefield.ForceFieldUFF >> 17 atoms will be minimized. >> minimize: creating bonds... >> minimize: setting atom types... >> Couldn't find file: UFF.txt >> Exception null in getResource UFF.txt >> 0 force field parameters read >> >> >> >> I don't think these are related, but they might be both security settings issues. Pretty much that's what we are seeing changing in browser updates these days. >> >> >> >> Test case is avalable at >> http://biomodel.uah.es/angel/test/Jmol_local_scripts.zip >> Unzip and run from disk, not from server. >> (Uses monolithic applet for simplicity; I've tested with the split >> applet too) >> >> >> >> >> ------------------------------------------------------------------------------ >> ThinkGeek and WIRED's GeekDad team up for the Ultimate >> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the >> lucky parental unit. See the prize list and enter to win: >> http://p.sf.net/sfu/thinkgeek-promo >> _______________________________________________ >> Jmol-users mailing list >> Jmo...@li... >> https://lists.sourceforge.net/lists/listinfo/jmol-users >> >> >> >> -- >> Robert M. Hanson >> Professor of Chemistry >> St. Olaf College >> 1520 St. Olaf Ave. >> Northfield, MN 55057 >> http://www.stolaf.edu/people/hansonr >> phone: 507-786-3107 >> >> >> If nature does not answer first what we want, >> it is better to take what answer we get. >> >> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 >> >> >> >> -- >> Robert M. Hanson >> Professor of Chemistry >> St. Olaf College >> 1520 St. Olaf Ave. >> Northfield, MN 55057 >> http://www.stolaf.edu/people/hansonr >> phone: 507-786-3107 >> >> >> If nature does not answer first what we want, >> it is better to take what answer we get. >> >> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 >> ------------------------------------------------------------------------------ >> ThinkGeek and WIRED's GeekDad team up for the Ultimate >> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the >> lucky parental unit. See the prize list and enter to win: >> http://p.sf.net/sfu/thinkgeek-promo_______________________________________________ >> Jmol-users mailing list >> Jmo...@li... >> https://lists.sourceforge.net/lists/listinfo/jmol-users > > J. Philip Bays > Professor of Chemistry > Department of Chemistry and Physics > Saint Mary's College > Notre Dame, IN 46556 > (574) 284-4663 > pb...@sa... > > > > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users > > > > > -- > Robert M. Hanson > Professor of Chemistry > St. Olaf College > 1520 St. Olaf Ave. > Northfield, MN 55057 > http://www.stolaf.edu/people/hansonr > phone: 507-786-3107 > > > If nature does not answer first what we want, > it is better to take what answer we get. > > -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo_______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users J. Philip Bays Professor of Chemistry Department of Chemistry and Physics Saint Mary's College Notre Dame, IN 46556 (574) 284-4663 pb...@sa... |