• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

createRobot

 
Sachingupta Gupta
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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)
 
Norm Radder
Bartender
Posts: 1526
14
  • Mark post as helpful
  • send pies
  • 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
  • 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
Bartender
Posts: 1526
14
  • Mark post as helpful
  • send pies
  • 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 "" {
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic