mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-20 07:02:32 +01:00
use java home for resource gatherer. Should cause the same jdk to be used for resource gatherer and work if you dont have java in the path.
This commit is contained in:
parent
e098b2a89f
commit
831dd6d610
@ -105,7 +105,8 @@ public class ResourceGatherer {
|
||||
}
|
||||
|
||||
private static void runDataGenerator(File serverJar) throws IOException {
|
||||
ProcessBuilder dataGenerator = new ProcessBuilder("java", "-cp", serverJar.getName(), "net.minecraft.data.Main", "--all", "--server", "--dev");
|
||||
final String javaExecutable = System.getProperty("java.home") + "/bin/java";
|
||||
ProcessBuilder dataGenerator = new ProcessBuilder(javaExecutable, "-cp", serverJar.getName(), "net.minecraft.data.Main", "--all", "--server", "--dev");
|
||||
dataGenerator.directory(TMP_FOLDER);
|
||||
LOGGER.info("Now running data generator with options '--dev', '--server', '--all'");
|
||||
LOGGER.info("Executing: {}", String.join(StringUtils.SPACE, dataGenerator.command()));
|
||||
|
Loading…
Reference in New Issue
Block a user