JFileChooser write permission
- From: momo@xxxxxxxxxxxxxxxx
- Date: 17 Oct 2006 08:48:25 -0700
Hi,
I have written a Java applet that I run from the command line
using appletviewer. I used policytool, setting the CodeBase to the
directory with the applet class, and gave "FilePermission," with a
target of <<ALL FILES>>, with permission to "read, write." After using
policytool, I can create a new FileOutputStream, and write to a file,
without throwing an exception (which I could not do before using
policytool). So far, so good.
However, with the same applet in the same directory, when I try to
run
JFileChooser fileChooser=new JFileChooser();
I get a java.security.AccessControlException. Why the difference, and
how do I get around it? I would think that if the security is OK with
opening a file with FileOutputStream it should be OK with opening a
file with JFileChooser. I saw that there were some older posts on this
subject, but was not able to follow them; I am a complete novice on
java security issues.
Thanks for any help you can provide, or any information about where I
can find this information on my own.
Momo
.
- Follow-Ups:
- Re: JFileChooser write permission
- From: Andrew Thompson
- Re: JFileChooser write permission
- Prev by Date: Re: Looking for Java/Win32 Automation API
- Next by Date: Re: JFileChooser write permission
- Previous by thread: images/ressources outside .war file
- Next by thread: Re: JFileChooser write permission
- Index(es):
Relevant Pages
|