I am trying to automatically start processes and open the applications using Java ProcessBuilder. When I run the script, the process starts and the window is opened in the background. How can I bring the application window to front when it launches?
ProcessBuilder builder = new ProcessBuilder("/Applications/VLC.app/Contents/MacOS/VLC");
Process pro = builder.start();
I would like to have the capability to take screenshot of the applications/windows that are launched. Hence, I want the launched application 'in the front'.