Results 1 to 1 of 1
- 07-02-2009, 10:56 AM #1
Member
- Join Date
- Nov 2008
- Posts
- 2
- Rep Power
- 0
Signed Applet to write on LPT1 port - permission error
Hi,
I have a simple applet based on this code:
Java Code:import java.awt.*; import java.applet.*; import java.util.*; import java.io.*; public class TestJavaXp extends Applet{ int i = 0; String s = "Print this text"; try { FileWriter out = new FileWriter("LPT1"); out.write(s); out.flush(); out.close(); } catch (IOException e) { e.printStackTrace(); } }
I signed the applet, I accepted the certification pop-up, but I receive this error:
uncaught exception: Error calling method on NPObject!
[plugin exception: java.security.AccessControlException: access denied (java.ioFilePermission LPT1 write)]
It works perfectly only if I grant permissions in the java.policies file, but I can't always do it of course.
Why?
I've no problem signing applets that write files on disk, I've troubles only with LPT1 port but I need it.
I tried different browsers (Firefox 3, Chrome 2, IE7).
Can anyone help me?
Thanks.
Similar Threads
-
how to write to parallel port?
By gen1mx6 in forum NetBeansReplies: 3Last Post: 07-30-2010, 06:06 PM -
'Permission denied' java script error
By java08 in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 04-13-2009, 08:19 AM -
[SOLVED] signed applet, or what
By AXH in forum Java AppletsReplies: 2Last Post: 10-10-2008, 01:28 AM -
run java signed applet in vista
By nanaji in forum Java AppletsReplies: 7Last Post: 05-14-2008, 11:59 AM -
.jnlp cant read & write on browser despite signed .jar
By bongia in forum New To JavaReplies: 0Last Post: 11-14-2007, 06:04 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks