I am running my java application as windows service and using java.awt.Robot
class to capture screen, but I getting a black screen.
Code:
Rectangle rect = new Rectangle(1400, 900);
Robot robot = new Robot();
BufferedImage bufferImg = robot.createScreenCapture(rect);
ImageIO.write(bufferImg, JPG_FORMAT, saveLocation);