|
-
May 15th, 2005, 05:32 PM
#1
Thread Starter
Frenzied Member
AccessControlException (access denied)
I can can use a BufferedReader to open a Streamat the command line, like this:
Code:
BufferedReader br = new BufferedReader(new InpuStreamReader(URL.openStream()));
Once I try to use this same statement inside of my applet, I get an AccessControlException. I know it's something to do with security, but how do you get around that?
-
May 23rd, 2005, 10:14 AM
#2
Frenzied Member
Re: AccessControlException (access denied)
 Originally Posted by System_Error
I can can use a BufferedReader to open a Streamat the command line, like this:
Code:
BufferedReader br = new BufferedReader(new InpuStreamReader(URL.openStream()));
Once I try to use this same statement inside of my applet, I get an AccessControlException. I know it's something to do with security, but how do you get around that?
Code:
BufferedReader br = new BufferedReader(new InputStreamReader(URL.openStream()));
Your code needed a t in Input probably wasn't that though, since it threw an exception .
Have you tried .printStackTrace() and attempted to trace the error?
"Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
- Zack de la Rocha
Hear me roar.
-
May 23rd, 2005, 02:38 PM
#3
Thread Starter
Frenzied Member
Re: AccessControlException (access denied)
Well, I finally found out what it was. I knew that applets didn't allow you access files and junk, but I never knew that trying to read from a url connection would cause problems. I did it at the console, and it worked. But for some reason applets have restriction to what I was trying to do.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|