Hi! I'm trying to launch Windows Media Player 11 on Windows Vista Home Premium from a java program. I tried this:
String path = "C:" + File.separator + "Users" + File.separator + "John" + File.separator + "Videos" + File.separator + "Movies" + File.separator + "Babel.avi";
String cmd = "wmplayer " + path + " /fullscreen";
Process p = Runtime.getRuntime().exec(cmd);
It doesn't work but it I try to launch Notepad it works. What am I doing wrong?
Also, is it possible for a Java program to give focus to another running program? For example, I want to launch Notepad using the Runtime class and then pass focus to the open Notepad document and use a robot to simulate input.
Thank you in advance for your help.