Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

I wrote a java applet that accesses the file system using AccessController.doPrivileged. it workes on all windows, and browsers, except FF on win 7.

  • 1 cavab
  • 1 has this problem
  • 3 views
  • Last reply by cor-el

more options

running as administrator solves the problem, however, it is not needed for IE or Chrome, only for FF. tested on win 7 with: FF: 16, 17 18 java: 1.6, 1.7 32 bit.

the code tries to write a file to the default sandbox location, and of course that it is signed. (otherwise it wouldn't have worked in other browsers):

AccessController.doPrivileged(new PrivilegedAction<String>() {
            public String run()
            {
                   String filename = UUID.randomUUID().toString();
                    File newTextFile = new File(filename);
                    String filepath = newTextFile.getAbsolutePath();
                    System.out.println(filepath);
                    fileWriter = new FileWriter(newTextFile);
                    fileWriter.write(content);
                    fileWriter.close();
                    return "a";
            
         }
       );
running as administrator solves the problem, however, it is not needed for IE or Chrome, only for FF. tested on win 7 with: FF: 16, 17 18 java: 1.6, 1.7 32 bit. the code tries to write a file to the default sandbox location, and of course that it is signed. (otherwise it wouldn't have worked in other browsers): <pre><nowiki> AccessController.doPrivileged(new PrivilegedAction<String>() { public String run() { String filename = UUID.randomUUID().toString(); File newTextFile = new File(filename); String filepath = newTextFile.getAbsolutePath(); System.out.println(filepath); fileWriter = new FileWriter(newTextFile); fileWriter.write(content); fileWriter.close(); return "a"; } );</nowiki></pre>

Modified by cor-el

All Replies (1)

more options

A good place to ask advice about web development is at the MozillaZine "Web Development/Standards Evangelism" forum.

The helpers at that forum are more knowledgeable about web development issues.
You need to register at the MozillaZine forum site in order to post at that forum.