|
|
|
|
![]() ![]() |
Apr 21 2008, 11:21 PM
Post
#1
|
|
|
Sparkx Group: [HOSTED] Posts: 339 Joined: 11-October 06 From: Dana Point, CA, USA Member No.: 16,496 |
I have looked all over the web for a solution and none of them seem to work. Anyway, I am trying to load a 3d object onto a scene with a java applet and I get the following error.
CODE java.security.AccessControlException: access denied (java.io.FilePermission object.obj read) I think that it has to do with my java.policy permissions, but I cant find anything that will fix it. Has anyone ever seen this error and/or know a solution to it? I am looking for a solution that will work on other people's computers without them downloading anything extra (other then the basic java) and hopefully the solution will be compatible with Astahost Webhosting. Thanks in advanced, Sparkx |
|
|
|
Apr 25 2008, 05:20 PM
Post
#2
|
|
|
Member [ Level 1 ] Group: [HOSTED] Posts: 47 Joined: 4-February 08 Member No.: 28,119 |
I am trying to load a 3d object onto a scene with a java applet and I get the following error. CODE java.security.AccessControlException: access denied (java.io.FilePermission object.obj read) ...Are you trying to load the image with an applet from the host using a socket connection or to load the image from client's local machine? In both situations the applet must be granted to get an access to this resource! Here is a good example how to grand an access from the applet to the local system file: http://www.captain.at/programming/java/ As you can see, keytool (which is included in Sun Development Kit) is used for this. |
|
|
|
Apr 28 2008, 04:10 PM
Post
#3
|
|
|
Sparkx Group: [HOSTED] Posts: 339 Joined: 11-October 06 From: Dana Point, CA, USA Member No.: 16,496 |
Thank you very much for replying. My problem did have to do with permissions for local files. I finally got it to work by signing my applet and using the keytool. Now I can access local files and it works on astahost and the object loads just fine (without color but that is probably because I messed up when I exported my .obj file). It seems like you know lots about java maby you could help me out in the future if I get some more errors.
Thanks again, Sparkx |
|
|
|
May 1 2008, 02:15 AM
Post
#4
|
|
|
Colonel Panic Group: [MODERATOR] Posts: 2,706 Joined: 25-March 05 From: Toronto, Ontario, Canada Member No.: 3,233 |
Next time, you should also use try/catch to print your errors.
CODE try{ //code logic here }catch(AccessControlException err){ System.out.println("I can't access a file here! Access Denied!"); } xboxrulz |
|
|
|
May 10 2008, 03:37 PM
Post
#5
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 0 Joined: 1-November 07 Member No.: 25,869 |
exception in thread \\\"main\\\" java.lang.noclassdeffounderror: Gui press any key to continue..
Java Java.security.accesscontrolexception Hey I get this error when I try to run this program The error is "exception in thread "main" java.Lang.Noclassdeffounderror: Gui press any key to continue.." I have 3 javas downloaded: Jre1.6.0_02 Jre6 Jre1.6.0_05 I'm not sure if its three javas, but is there a way to make this program run? I've been trying to fix it for days... Please help me.. Kaleb -reply by Kaleb |
|
|
|
Jun 12 2008, 04:01 AM
Post
#6
|
|
|
Sparkx Group: [HOSTED] Posts: 339 Joined: 11-October 06 From: Dana Point, CA, USA Member No.: 16,496 |
I thought I had finally solved this problem but I keep getting errors. I go to put my program on the web and bam security errors again. Anyway I was a little confused about something. I read this and made the Write.jp but it won’t work correctly. I get a java.security.AccessControlException that has access denied for (java.lang.RuntimePermission createClassLoader). Is there any other tutorial that will show me how to sign my jar and attach the policy to it so that the class will be granted permission for all (java.security.AllPermission) and will work for HTML (without modifying my .java file).
Kaleb Noclassdeffounderror is caused by something different. I think it has to do with an invalid class or an incorrect class path. Also I think that error is cause by JDK (Java Development Kit) not JRE (Java Runtime Environment). Thanks for the help, Sparkx |
|
|
|
Jun 13 2008, 05:42 PM
Post
#7
|
|
|
Way Out Of Control - You need a life :) Group: [MODERATOR] Posts: 1,969 Joined: 16-August 05 Member No.: 7,896 |
Did you try a general chmod for testing purposes ? Just chmod -R 777 on the whole folder, so everybody and each program has permission on everything ? If this works, you could refine step by step.
I know this is a trapping situation, because the userid of the owner of the files is not the userid of the process executing java. Besides that, sorry, I'm a system admin, and I know close to nothing about java and html. |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 22nd August 2008 - 01:47 AM |