Skip to content
Permalink
Browse files

FIX: app run not working on Windows #115

  • Loading branch information
xhanin committed Dec 30, 2014
1 parent 710f27e commit 154dfc5466dd51672f70cae38075ca9cd225200e
Showing with 4 additions and 2 deletions.
  1. +4 −2 restx-core/src/main/java/restx/Apps.java
@@ -2,6 +2,7 @@

import com.google.common.base.Optional;
import com.google.common.base.Splitter;
import com.google.common.base.StandardSystemProperty;
import com.google.common.collect.ImmutableList;
import com.google.common.eventbus.EventBus;
import com.google.common.eventbus.Subscribe;
@@ -29,6 +30,7 @@
*/
public class Apps {
private static final Logger logger = LoggerFactory.getLogger(Apps.class);
private static final String PATH_SEP = StandardSystemProperty.PATH_SEPARATOR.value();

public static Apps with(AppSettings appSettings) {
return new Apps(appSettings);
@@ -106,10 +108,10 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IO

public Process run(File workingDirectory, Path targetClasses, Path dependenciesDir, List<String> vmOptions,
String mainClassName, List<String> args, boolean quiet) throws IOException {
String classpath = targetClasses.toString() + ":" + dependenciesDir.toString() + "/*";
String classpath = targetClasses.toString() + PATH_SEP + dependenciesDir.toString() + "/*";
File toolsJar = new File(System.getenv("JAVA_HOME") + "/lib/tools.jar");
if (toolsJar.exists()) {
classpath += ":" + toolsJar.getAbsolutePath();
classpath += PATH_SEP + toolsJar.getAbsolutePath();
}

final Process process = new ProcessBuilder(

0 comments on commit 154dfc5

Please sign in to comment.
You can’t perform that action at this time.