• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

createRobot

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I am trying a remote class object on the applet for RDS.while i am runing it on applet viewer then it is working fine but when i ambed this applet on a html file then it gives following error.
I have also changed my java.policy file.Even it is giving error.

My email id is sachinguptamca@rediffmail.com

if anyone can help me on this i shall be thankfull to you.

java.security.AccessControlException: access denied (java.awt.AWTPermission createRobot)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.awt.Robot.checkRobotAllowed(Unknown Source)
at java.awt.Robot.init(Unknown Source)
at java.awt.Robot.<init>(Unknown Source)
at com.teacher.StudentSuper$Student.main11(StudentSuper.java:122)
at com.teacher.StudentSuper.init(StudentSuper.java:33)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
 
Rancher
Posts: 5008
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please post the lines from your policy file that give permission.
Is the codebase correct? Did you try it with the empty codebase?
 
Sachingupta Gupta
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have made the following entries on the java.policy file

Grant codeBase "" {
permission java.awt.AWTPermission "createRobot";
};
even it is giving the same error

java.security.AccessControlException: access denied (java.awt.AWTPermission createRobot)
please send me any solution
or let me know that how to use codebase
 
Norm Radder
Rancher
Posts: 5008
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Getting the policy file to work has often been a trial and error thing.
The system doesn't give error messages in many cases.
A difference I see is in the lines you show:
grant {
vs
Grant codeBase "" {
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic