I have a Java Swing application which is started by a batch(.bat) file. The batch file is in turn started by a utility written in C++ as a seperate process using WIN32 API.
In my java application I am getting screen captured using createScreenCapture() method of java.awt.Robot class.
When I manually start the batch file, i am getting screen shots correctly. But if I use the utility written in C++ to start my application, i am getting a black rectangle instead of actual screen shot. Please let me know how to solve this issue? Also let me know if there is any way to capture screen other than using java.awt.Robot class.