fix path for windows

pull/7/head
xiaoye20185 2024-04-10 22:36:13 +08:00
parent 30a07f9c60
commit c97d87c0b9
1 changed files with 4 additions and 0 deletions

View File

@ -27,6 +27,10 @@ public class Launcher {
}
String jarPath = jarURI.getPath();
String os = System.getProperty("os.name").toLowerCase();
if (os.contains("win")) {
jarPath = jarPath.substring(1).replace("/", "\\");
}
if (args.length > 1 && args[0].equals(ATTACH_ARG)) {
VMLauncher.attachVM(jarPath, args[1], args.length > 2 ? args[2] : null);
return;