diff --git a/src/main/java/com/skcraft/launcher/launch/JavaProcessBuilder.java b/src/main/java/com/skcraft/launcher/launch/JavaProcessBuilder.java index 61d1dc1..893f0d2 100644 --- a/src/main/java/com/skcraft/launcher/launch/JavaProcessBuilder.java +++ b/src/main/java/com/skcraft/launcher/launch/JavaProcessBuilder.java @@ -6,6 +6,8 @@ package com.skcraft.launcher.launch; +import com.skcraft.launcher.util.Environment; +import com.skcraft.launcher.util.Platform; import lombok.Getter; import lombok.Setter; import lombok.ToString; @@ -79,7 +81,11 @@ public class JavaProcessBuilder { public List buildCommand() { List command = new ArrayList(); - command.add(getJvmPath() + File.separator + "java"); + if(Environment.getInstance().getPlatform() == Platform.WINDOWS) { + command.add(getJvmPath() + File.separator + "java"); + } else { + command.add("java"); + } for (String flag : flags) { command.add(flag);