|
security permissions are causing my sleepless nights.
Their Java-cast
Problems with java security permissions are causing my sleepless nights.
I wrote a small java applet that needs to load in image files from a folder called Imagestore at my website folder.
1) the applet works just fine on the sun applet viewer (because it grants all file i/o permissions).
2) once launching from a web browser the trouble starts. After finding out how to activate the console on my intel Mac book the following message appears: java.security.AccessControlException: access denied (java.io.FilePermission Imagestore read).
3) I modified the applet.policy file into:
grant codeBase "file:/webwillem/*" {
permission java.security.AllPermission;
}; (when everything Works all right I probably should specify a read only condition for the Imagestore folder of the webwillem folder at the userdir.
a) So my first question is how to setup the content of the applet.policy file.
b) And where sits that file in order to work correctly (for the moment it gets copied automatic into my jar-applet file without having much effect I believe).
c) After having the correct content of the policy file and having it put at the right spot, the applet should work correctly (when I take out e.g. the file download content of the applet, it does appear on my webpage).
Please keep in mind that I work on a mac osx (10.4) system, so pc information, I believe does help me much. Though I even do not really understand where the problem lies (java app, netbeans, web browser or mac system). It is pretty confusing all (there might come a message from a ¨helpful-dude¨saying ¨stop complaining start learning the languages”…. But there is precisely where leis the dilemma of it all….
Rephrasing my (unanswered) question really helps (me and maybe others) to come each time a bit closer to the solution of this nightmare-problem. I wonder, can’t these things be a little easier (or is it all a result of big company wars such as sun Microsoft apple etc) or am I just to limited to understand this all.
willemjav
|