Improve error message when using genSources on a 32bit java

dev/0.11
modmuss50 2019-10-26 22:54:48 +01:00
parent 13ae0ae263
commit 94751530f4
1 changed files with 5 additions and 0 deletions

View File

@ -40,6 +40,7 @@ import org.gradle.process.ExecResult;
import org.jetbrains.java.decompiler.main.extern.IFernflowerPreferences; import org.jetbrains.java.decompiler.main.extern.IFernflowerPreferences;
import java.io.File; import java.io.File;
import net.fabricmc.loom.util.OperatingSystem;
import java.util.*; import java.util.*;
import java.util.function.Supplier; import java.util.function.Supplier;
@ -55,6 +56,10 @@ public class FernFlowerTask extends AbstractDecompileTask implements ForkingJava
@TaskAction @TaskAction
public void doTask() throws Throwable { public void doTask() throws Throwable {
if(!OperatingSystem.is64Bit()){
throw new UnsupportedOperationException("FernFlowerTask requires a 64bit JVM to run due to the memory requirements");
}
Map<String, Object> options = new HashMap<>(); Map<String, Object> options = new HashMap<>();
options.put(IFernflowerPreferences.DECOMPILE_GENERIC_SIGNATURES, "1"); options.put(IFernflowerPreferences.DECOMPILE_GENERIC_SIGNATURES, "1");
options.put(IFernflowerPreferences.BYTECODE_SOURCE_MAPPING, "1"); options.put(IFernflowerPreferences.BYTECODE_SOURCE_MAPPING, "1");