java调用本地播放器播放视频文件. 呼叫本地播放器无法播放指定文件的描述.
public class OpenExe extends HttpServlet {
//打开本地播放器并播放视频
public static void openExe(String file) {
Runtime rn = Runtime.getRuntime();
Process p = null;
try {
p = rn.exec("D:/The entertainment software/Player/Player.exe "+file);
} catch (Exception e) {
System.out.println("Error exec!");
}
}
}
rn.exec(“ D: /Theenttainmentsoftware/Player/Player.exe” +文件);
此函数有两个参数: