R
RowdyRednose
My applet reads the contents of a document relative to the document
base. This does not work in IE using Sun Java 1.4.2 when loading the
applet from the file system (url=file:/...). I get an exception (see
below).
However, doing one of the following changes - but not changing one bit
of the java code - makes it work:
1) using MyApplet.class directly instead of packaging it in a jar
2) loading the applet from an http server
3) using the MS VM or an SunVM < 1.4.2
4) using Mozilla (and Sun 1.4.2)
Only option 1) would allow any user - regardless of his/her
configuration - to use the applet.
As users must be able to start it from disc oder harddrive, 2) is no
option for me.
Has anyone another solution to this problem? I WANT to use Jars
because I have many classes...
--
java.security.AccessControlException: access denied
(java.io.FilePermission C:\...\file.txt read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at java.io.File.isDirectory(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.connect(Unknown
Source)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown
Source)
at MyApplet.start(Unknown Source)
base. This does not work in IE using Sun Java 1.4.2 when loading the
applet from the file system (url=file:/...). I get an exception (see
below).
However, doing one of the following changes - but not changing one bit
of the java code - makes it work:
1) using MyApplet.class directly instead of packaging it in a jar
2) loading the applet from an http server
3) using the MS VM or an SunVM < 1.4.2
4) using Mozilla (and Sun 1.4.2)
Only option 1) would allow any user - regardless of his/her
configuration - to use the applet.
As users must be able to start it from disc oder harddrive, 2) is no
option for me.
Has anyone another solution to this problem? I WANT to use Jars
because I have many classes...
--
java.security.AccessControlException: access denied
(java.io.FilePermission C:\...\file.txt read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at java.io.File.isDirectory(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.connect(Unknown
Source)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown
Source)
at MyApplet.start(Unknown Source)