summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2015-01-05 14:46:07 +1100
committermd_5 <git@md-5.net>2015-01-05 14:46:07 +1100
commita7829bfaaddcf0eac35036c54d90a11e2c01f2da (patch)
tree216324a1acef1c0ac173be45ba9e057b062ac5f1 /src/main/java
parent9d9ebf6ce537e2dd60411701ce7344c9d8ad2643 (diff)
downloadbuildtools-a7829bfaaddcf0eac35036c54d90a11e2c01f2da.tar
buildtools-a7829bfaaddcf0eac35036c54d90a11e2c01f2da.tar.gz
buildtools-a7829bfaaddcf0eac35036c54d90a11e2c01f2da.tar.lz
buildtools-a7829bfaaddcf0eac35036c54d90a11e2c01f2da.tar.xz
buildtools-a7829bfaaddcf0eac35036c54d90a11e2c01f2da.zip
Remove the need for JDK to be installed.
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/spigotmc/builder/Builder.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/spigotmc/builder/Builder.java b/src/main/java/org/spigotmc/builder/Builder.java
index cc0b8b7..52bee85 100644
--- a/src/main/java/org/spigotmc/builder/Builder.java
+++ b/src/main/java/org/spigotmc/builder/Builder.java
@@ -368,7 +368,11 @@ public class Builder
public static int runProcess(File workDir, String... command) throws Exception
{
- final Process ps = new ProcessBuilder( command ).directory( workDir ).start();
+ ProcessBuilder pb = new ProcessBuilder( command );
+ pb.directory( workDir );
+ pb.environment().put( "JAVA_HOME", System.getProperty( "java.home" ) );
+
+ final Process ps = pb.start();
new Thread( new StreamRedirector( ps.getInputStream(), System.out ) ).start();
new Thread( new StreamRedirector( ps.getErrorStream(), System.err ) ).start();