• Post Reply Bookmark Topic Watch Topic
  • New Topic

AccessControlException When Capture screen with Applet

I Gusti Putu Anom Abadi
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hallo All,
I Need some help,
I am creating an applet to capture the screen,
when it is as a class with main function, it working,
but when it is as applet, this will throw an exception
java.security.AccessControlException: access denied (java.awt.AWTPermission createRobot)
I read some article, that applet very secure, it can't read local file system.
SecurityManager security = System.getSecurityManager();
if (security != null)
AWTPermission Aperm = new AWTPermission("createRobot");
BufferedImage ScImage = (new Robot()).createScreenCapture(new Rectangle(0,0,800,600));
}catch(AccessControlException xc)
System.out.println("AwtPermission -> Create Robot");
}catch(Exception ef)
is that line correct to get a security access ..?
can anyone tell me how to handle this security, please
Thank in advance,
Best Regards,
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!