Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

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 답장
  • 1 이 문제를 만남
  • 3 보기
  • 최종 답변자: 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>

글쓴이 cor-el 수정일시

모든 댓글 (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.