Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

AccessControlException When Capture screen with Applet

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 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,
Oh, sure, you could do that. Or you could eat some pie. While reading this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic