|
23 | 23 | import com.spotify.flo.Fn; |
24 | 24 | import com.spotify.flo.Serialization; |
25 | 25 | import com.spotify.flo.SerializationException; |
26 | | -import com.spotify.flo.freezer.PersistingContext; |
27 | 26 | import java.io.BufferedReader; |
28 | 27 | import java.io.Closeable; |
| 28 | +import java.io.File; |
29 | 29 | import java.io.IOException; |
30 | 30 | import java.io.InputStream; |
31 | 31 | import java.io.InputStreamReader; |
|
48 | 48 | import java.util.Objects; |
49 | 49 | import java.util.concurrent.ExecutorService; |
50 | 50 | import java.util.concurrent.Executors; |
| 51 | +import java.util.stream.Collectors; |
51 | 52 | import org.slf4j.Logger; |
52 | 53 | import org.slf4j.LoggerFactory; |
53 | 54 |
|
@@ -135,9 +136,14 @@ void start() { |
135 | 136 | } catch (SerializationException e) { |
136 | 137 | throw new RuntimeException("Failed to serialize closure", e); |
137 | 138 | } |
138 | | - |
139 | | - final ProcessBuilder processBuilder = new ProcessBuilder(java.toString(), "-cp", classPath) |
140 | | - .directory(workdir.toFile()); |
| 139 | + |
| 140 | + final String absoluteClassPath = |
| 141 | + Arrays.stream(classPath.split(File.pathSeparator)) |
| 142 | + .map(cp -> Paths.get(cp).toAbsolutePath().toString()) |
| 143 | + .collect(Collectors.joining(File.pathSeparator)); |
| 144 | + |
| 145 | + final ProcessBuilder processBuilder = |
| 146 | + new ProcessBuilder(java.toString(), "-cp", absoluteClassPath).directory(workdir.toFile()); |
141 | 147 |
|
142 | 148 | // Propagate -Xmx and -D. |
143 | 149 | // Note: This is suboptimal because if the user has configured a max heap size we will effectively use that |
|
0 commit comments