HMCL-dev / HMCL

A Minecraft Launcher which is multi-functional, cross-platform and popular
https://hmcl.huangyuhui.net
GNU General Public License v3.0
7.03k stars 684 forks source link

无法使用指定的java启动游戏 #611

Closed rhjdvsgsgks closed 5 years ago

rhjdvsgsgks commented 5 years ago

获取到hmcl生成的启动命令后手动将其中的java路径改成 /usr/lib/jvm/java-12-j9/bin/java 后可正常启动游戏

huanghongxun commented 5 years ago

请提供这个java的 java --version 的输出信息

rhjdvsgsgks commented 5 years ago

openjdk 12.0.2 2019-07-16 OpenJDK Runtime Environment AdoptOpenJDK (build 12.0.2+10) Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.15.1, JRE 12 Linux amd64-64-Bit Compressed References 20190719_151 (JIT enabled, AOT enabled) OpenJ9 - 0f66c6431 OMR - ec782f26 JCL - 06c2cc3322 based on jdk-12.0.2+10)

MintTang commented 5 years ago

openjdk?

rhjdvsgsgks commented 5 years ago

openjdk?

可以这么说

MintTang commented 5 years ago

试试openjdk 8?

MintTang commented 5 years ago

12太高了吧emmm

试试openjdk 8?

rhjdvsgsgks commented 5 years ago

12太高了吧emmm

试试openjdk 8?

都说了“获取到hmcl生成的启动命令后手动将其中的java路径改成 /usr/lib/jvm/java-12-j9/bin/java 后可正常启动游戏”

rhjdvsgsgks commented 5 years ago

log

[17:13:49] [org.jackhuang.hmcl.util.platform.JavaVersion.lambda$lookupJavas$2/WARNING] Failed to determine Java at /usr/lib/jvm/java-12-j9/bin/java
java.io.IOException: Unrecognized Java version 12.0.2
        at org.jackhuang.hmcl.util.platform.JavaVersion.fromExecutable(JavaVersion.java:135)
        at org.jackhuang.hmcl.util.platform.JavaVersion.lambda$lookupJavas$2(JavaVersion.java:218)
        at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:269)
        at java.util.stream.DistinctOps$1$2.accept(DistinctOps.java:175)
        at java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:419)
        at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:647)
        at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:272)
        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
        at java.util.Iterator.forEachRemaining(Iterator.java:116)
        at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
        at org.jackhuang.hmcl.util.platform.JavaVersion.lookupJavas(JavaVersion.java:224)
        at org.jackhuang.hmcl.util.platform.JavaVersion.initialize(JavaVersion.java:184)
        at org.jackhuang.hmcl.util.function.ExceptionalRunnable.lambda$toCallable$0(ExceptionalRunnable.java:32)
        at org.jackhuang.hmcl.task.Task$SimpleTask.execute(Task.java:849)
        at org.jackhuang.hmcl.task.TaskExecutor.lambda$null$13(TaskExecutor.java:168)
        at org.jackhuang.hmcl.task.TaskExecutor.lambda$wrap$24(TaskExecutor.java:260)
        at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1626)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
huanghongxun commented 5 years ago

Fixed in commit 993ce660aa716b4ff81c64c63ae5c903bb3a5577

rhjdvsgsgks commented 5 years ago

更新后java-12-j9依然无法被检测,但java-8/10/11-j9可以被正常检测 Screenshot_20191021_144852

已经解决