applets grants permission in Netscape

I wrote a applet and want to grant permission to read property.
I add the following code."UniversalProperty read);

Then I use System.getProperty("user.home").
When I run the applet, I see a dialog box asking me to grant or deny permission.( Because I haven't signed my applet, it said my is not digitally signed). Then I pressed grant button.
But when running the getProperty statement. The following error

# Applet exception: security.checkpropsaccess.key security.checkpropsaccess.key

  at java.lang.Throwable.<init>(Compiled Code)

  at java.lang.Exception.<init>(Compiled Code)

  at java.lang.RuntimeException.<init>(Compiled Code)

  at java.lang.SecurityException.<init>(Compiled Code)

  at<init>(Compiled Code)

  at<init>(Compiled Code)

  at Code)

  at java.lang.SecurityManager.checkPropertyAccess(Compiled Code)

* at java.lang.System.getProperty(Compiled Code)

  at Code)

  at Code) CreateProcess: vcafe -netscape error=2

  at java.lang.Win32Process.<init>(Compiled Code)

  at java.lang.Runtime.exec(Compiled Code)

* at java.lang.Runtime.exec(Compiled Code)

  at netscape.debug.Debugger.launchDebugger(Compiled Code)

  at netscape.debug.Debugger.uncaughtException(Compiled Code)

  at netscape.applet.AppletThreadGroup.uncaughtException(Compiled Code)

What's the problem?

ALso, netscape's JVM has package?
Who is Participating?
heyhey_Connect With a Mentor Commented:
' at java.lang.System.getProperty(Compiled Code)
  at Code)'

it seems that you use multiple Threads - so do you know that you have to enablePrivilege in the same Thread, before you execute the 'problematic' method.

TorusAuthor Commented:
Edited text of question.
TorusAuthor Commented:
yup. I use thread. The you mean that I need to put the enablePrivileage code in the thread?
Never miss a deadline with

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

TorusAuthor Commented:
I tried to put enablePrivilege("UniversalFileAccess") to the thread also. But I got error when reading file security.checkread: Codebase 'MyDir' does not include 'UserhomeDir/user.wav'

MyDir is the directory storing the class file. I tested it in local machine only without using web server.

It seems I can't read the UserhomeDir file.
> security.checkread: ..

if you want to read files, you have to enable file reading too
TorusAuthor Commented:
but UnversialFileAccess includes read, write and delete operator, right?
can't check at the moment ...
I found these three lines of code in some old project"UniversalFileRead");"UniversalFileWrite");"UniversalConnect");
TorusAuthor Commented:
ok, I know what the problem is.
All Courses

From novice to tech pro — start learning today.