运行时类创建的线程冻结,MineCraft,JavaFX控制器

时间:2019-03-02 23:17:37

标签: java javafx

我正在通过运行时创建线程,一段时间后,我的线程冻结了。

代码:

 @Override
public MineCraftProcess launch(@NotNull LaunchParameters args) throws Exception {
    this.command.append(" ").append(args.build());

    Process process = Runtime.getRuntime().exec(command.toString());

    return new MineCraftProcess(this, process);
}

命令:

java -Xmn128M -Xmx1024M -Djava.library.path=D:\minecraft\versions\1.12.2\natives -cp D:\minecraft\libraries\org\tlauncher\patchy\1.1\patchy-1.1.jar;D:\minecraft\libraries\oshi-project\oshi-core\1.1\oshi-core-1.1.jar;D:\minecraft\libraries\net\java\dev\jna\jna\4.4.0\jna-4.4.0.jar;D:\minecraft\libraries\net\java\dev\jna\platform\3.4.0\platform-3.4.0.jar;D:\minecraft\libraries\com\ibm\icu\icu4j-core-mojang\51.2\icu4j-core-mojang-51.2.jar;D:\minecraft\libraries\net\sf\jopt-simple\jopt-simple\5.0.3\jopt-simple-5.0.3.jar;D:\minecraft\libraries\com\paulscode\codecjorbis\20101023\codecjorbis-20101023.jar;D:\minecraft\libraries\com\paulscode\codecwav\20101023\codecwav-20101023.jar;D:\minecraft\libraries\com\paulscode\libraryjavasound\20101123\libraryjavasound-20101123.jar;D:\minecraft\libraries\com\paulscode\librarylwjglopenal\20100824\librarylwjglopenal-20100824.jar;D:\minecraft\libraries\com\paulscode\soundsystem\20120107\soundsystem-20120107.jar;D:\minecraft\libraries\io\netty\netty-all\4.1.9.Final\netty-all-4.1.9.Final.jar;D:\minecraft\libraries\com\google\guava\guava\21.0\guava-21.0.jar;D:\minecraft\libraries\org\apache\commons\commons-lang3\3.5\commons-lang3-3.5.jar;D:\minecraft\libraries\commons-io\commons-io\2.5\commons-io-2.5.jar;D:\minecraft\libraries\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;D:\minecraft\libraries\net\java\jinput\jinput\2.0.5\jinput-2.0.5.jar;D:\minecraft\libraries\net\java\jutils\jutils\1.0.0\jutils-1.0.0.jar;D:\minecraft\libraries\com\google\code\gson\gson\2.8.0\gson-2.8.0.jar;D:\minecraft\libraries\com\mojang\authlib\1.5.25\authlib-1.5.25.jar;D:\minecraft\libraries\com\mojang\realms\1.10.22\realms-1.10.22.jar;D:\minecraft\libraries\org\apache\commons\commons-compress\1.8.1\commons-compress-1.8.1.jar;D:\minecraft\libraries\org\apache\httpcomponents\httpclient\4.3.3\httpclient-4.3.3.jar;D:\minecraft\libraries\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar;D:\minecraft\libraries\org\apache\httpcomponents\httpcore\4.3.2\httpcore-4.3.2.jar;D:\minecraft\libraries\it\unimi\dsi\fastutil\7.1.0\fastutil-7.1.0.jar;D:\minecraft\libraries\org\apache\logging\log4j\log4j-api\2.8.1\log4j-api-2.8.1.jar;D:\minecraft\libraries\org\apache\logging\log4j\log4j-core\2.8.1\log4j-core-2.8.1.jar;D:\minecraft\libraries\org\lwjgl\lwjgl\lwjgl\2.9.4-nightly-20150209\lwjgl-2.9.4-nightly-20150209.jar;D:\minecraft\libraries\org\lwjgl\lwjgl\lwjgl_util\2.9.4-nightly-20150209\lwjgl_util-2.9.4-nightly-20150209.jar;D:\minecraft\libraries\com\mojang\text2speech\1.10.3\text2speech-1.10.3.jar;D:\minecraft\versions\1.12.2\1.12.2.jar  -Dminecraft.applet.TargetDirectory=D:\minecraft net.minecraft.client.main.Main --assetsDir D:\minecraft\assets --assetsIndex 1.12 --gameDir D:\minecraft --username ffdaf --version null --userType null --height 530 --width 925 --accessToken null 

(我在JavaFX控制器中使用启动方法)

0 个答案:

没有答案