Voxelum / x-minecraft-launcher

An Open Source Minecraft Launcher with Modern UX. Provide a Disk Efficient way to manage all your Mods!
https://xmcl.app/
MIT License
729 stars 105 forks source link

Trying to launch a localhost server fails with invalid java path #792

Closed Albator11 closed 1 month ago

Albator11 commented 1 month ago

Is there an existing issue for this?

Launcher Version

0.47.1

Operating System

Mac

Architecture

x64

Current Behavior

Try to launch a localhost server fails with launchInvalidJavaPath exception.

The exception's Java path it shows is correct, however, the path it's trying to call appends 'w' to the binary... e.g. It shows this: ~/.xmcl/jre/java-runtime-delta/jre.bundle/Contents/Home/bin/java But is actually trying to call this: ~/.xmcl/jre/java-runtime-delta/jre.bundle/Contents/Home/bin/javaw

This can easily be seen by clicking on server launch arguments preview.

Making a symlink named javaw that points to the java binary fixes the problem!

Expected Behavior

Call java instead of javaw.

Steps To Reproduce

  1. Create a game with Minecraft 1.21.1 and Fabric 0.16.5
  2. Launch localhost server

(I assume other Minecraft versions &c. produce the same output... but technically have not verified)

Anything else?

No response

ci010 commented 1 month ago

Should fixed in https://[github.com/Voxelum/x-minecraft-launcher/commit/ed205ecb8e0eeaa4783e239c1f1df2279e0c28c4](https://github.com/Voxelum/x-minecraft-launcher/commit/ed205ecb8e0eeaa4783e239c1f1df2279e0c28c4)