fix path for windows

This commit is contained in:
xiaoye20185 2024-04-10 22:36:13 +08:00
parent 30a07f9c60
commit c97d87c0b9

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;