Skip to content

Commit

Permalink
FIX: app run not working on Windows #115
Browse files Browse the repository at this point in the history
  • Loading branch information
xhanin committed Dec 30, 2014
1 parent 710f27e commit 154dfc5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions restx-core/src/main/java/restx/Apps.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 154dfc5

Please sign in to comment.