execute file .lnk in Java
问题 i need to execute a .lnk file in java (lnk file that points at an exe file). how can i do? in vb .net i do Process.Start(path) and it works thx you for help. 回答1: Use a ProcessBuilder: ProcessBuilder pb = new ProcessBuilder("cmd", "/c", "C:\\temp\\file.lnk"); Process process = pb.start(); Call process.getInputStream() and process.getErrorStream() to read the output and error output of the process. 回答2: On Windows, you could use rundll : Runtime.getRuntime().exec("rundll32 SHELL32.DLL