From 3a101dab7394a6d1c7f5e3fbf2b77e0785acd28e Mon Sep 17 00:00:00 2001 From: Ton Broekhuizen Date: Sat, 11 Jan 2014 16:16:12 +0100 Subject: [PATCH] Attempt to fix Unix support --- .../com/skcraft/launcher/launch/JavaProcessBuilder.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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);