public Object doWork() { System.out.println("当前程序处于远程调用中"); return Thread.currentThread().getName() + " " + new Date(System.currentTimeMillis()); } } 5.在java中调用windows程序 public class ProcessCaller {
public static void callMp3() { Runtime ru = Runtime.getRuntime(); try { // 调用播放器文件播放指定MP3 Process p1 = ru .exec("C:\\Program Files\\Windows Media Player\\wmplayer D:\\Jack\\Mp3\\5.秋天不回来-王强.mp3"); } catch (Exception e) {