Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using java.awt.Robot from a Servlet

Status
Not open for further replies.

mluken

Programmer
Dec 31, 2003
54
US
I need to have a servlet that will do a Print Screen of the server machine. Here is the code that I am using:

import java.awt.*;
//----------
int printScreenKey = KeyEvent.VK_PRINTSCREEN;
RobotInterface r = new RobotInterface();
r.keyPress(printScreenKey);

If I run this from a DOS prompt from the server, it does a Print Screen. However when I run it from a servlet, it does not. Any ideas why???

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top