Someone wrote:

> I got the time to upgrade my Mac OS to 10.3.7 and I downloaded the new
> Jmol10 code so I could start using your .js library to build new pages
> based on it.

Good.

I strongly encourage everyone to use Jmol.js if at all possible.

If you do not then you are in danger of being left behind.

> I want to do all this testing locally on the Mac but I'm
> running into a java.security problem with opening the molecule.pdb file.

Q: Are all the things in the same directory?

 1. html file 2. JmolApplet.jar 3. Jmol.js 4. xxxx.pdb ?

> I'm access the html page via a file: open request in the browser and here
> is what the console log contains:
>
> AppletRegistry.checkIn(jmolApplet0)
> (C) 2004 The Jmol Development Team
> Jmol Version 10.00  2004/12/17 18:55
> java.vendor:Apple Computer, Inc.
> java.version:1.4.2_05
> os.name:Mac OS X
> appletDocumentBase=file:/Users/aaaa/Sites/jmoltest.html
> setting color scheme to:jmol
> animationReplayMode=0
> FileManager.openFile(someFile.pdb)
> error opening file:/Users/aaaa/Sites/xxxx.pdb
> java.security.AccessControlException: access denied
> (java.io.FilePermission /Users/aaaa/Sites/xxxx.pdb read)
> openFile(xxxx.pdb) 4 ms

Hmmm ... looks like everything is in the same spot.

> is there a place I can put the files so the applet is able to access them?
> I don't really want to turn on the http: access to this machine.

Different browsers behave in different ways with applets running through
file:// instead of http:// to a web browser.

Most will allow you to access things if everything is in the same
directory. But it is up to the browser/Java implementation.

Two options:


Option 1 - Turn on the web server, but only allow local access
--------------------------------------------------------------

*** 2 minutes later ***

Those bozos ... looks like you cannot do that, at least with 10.3.3 that I
have ... so much for their so-called 'Firewall'

OK, there is still another option.
You can configure apache so that it will only accept requests from the
local machine.

$ su
#cd /etc/httpd
#<edit> httpd.conf
search for 'Listen' it will be commented out with '#'
Add:
Listen 127.0.0.1:80

save

#apachectl restart (or apachectl start)

Actually, in your case, just turn it on in the control panel.

Other machines will not be able to get in. Confirm by trying from another
machine.

I suggest that you put in a symbolic link to your work area from


Option 2 - turn on the web server, but prompt for a password.
-------------------------------------------------------------
you should be able to add a .htaccess file to your local directory. Then
the browser will prompt the user for a password.

I would google for 'htaccess osx os x apache'


Option 3 - wait for Miguel to build a signed applet
---------------------------------------------------
Building a 'signed' applet is on my list of things to do.

I still have some research to do and I still need to integrate it into our
standard build/distribution procedures.

A signed applet will prompt the user and ask if it is OK to install and
execute. Once the user approves then the applet will be able to read and
write from the local hard drive, and *should* allow access through file://
to the local file system.

Note that the signed applet will not work on the MSFT and Netscape 4.7
Java Virtual Machines.


Miguel

-----
Open Source Molecular Visualization
www.jmol.org
[EMAIL PROTECTED]
-----



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to