Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run client/server under any java version and play on public servers (macOS M1/2/3 fix and other) #12768

Open
JayDi85 opened this issue Aug 31, 2024 · 2 comments
Labels
FAQ Instructions to fix problems linux / macos support Questions from users, help and support

Comments

@JayDi85
Copy link
Member

JayDi85 commented Aug 31, 2024

For macOS users: current releases are fully compatible and haven't any freezes anymore, so you don't need to use java replacement

Current public servers works under java 8 and it's incompatible with java 9+ clients by default.

On server connection it will show errors like:

  • java.lang.reflect.InaccessibleObjectException: Unable to make private void java.io.ObjectOutputStream.clear() accessible: module java.base does not "opens java.io" to unnamed module

There is possible a solution to run compatible client under any java version. It can be usefull for macOS with M1/2/3 machines who can't run java 8 due constant freeze (#12431). Added: not actual anymore cause macOS freezes fixed with non-blocking in last release #12825

Instruction:

  1. Download and install current client from http://xmage.today/ (follow site instructions);
  2. Run launcher and press update button - it will download java and other files;
  3. Open launcher's "settings -> java -> client options" and add that additional params to the end (keep spaces too):
    • --add-opens=java.base/java.io=ALL-UNNAMED
    • shot_240831_211810
  4. Find and download latest OpenJDK version from any sites like https://adoptium.net/temurin/releases/
    • use stable/lts version first like java 17 or 21;
    • if nothing helps then use java 24 from here;
  5. Extract java files to temp folder and copy that files to xmage's "launcher\java\jre1.8.0_201" folder -- make sure you keep same files structure;
  6. Now run client from a launcher again and play on any public servers;
  7. Warning, if you see pixelated images, icons and text then must disabled Windows's DPI-aware feature or add the follow additional launcher param for java - client:
    • -Dsun.java2d.uiScale=1.0
@JayDi85 JayDi85 added linux / macos support Questions from users, help and support FAQ Instructions to fix problems labels Aug 31, 2024
@JayDi85 JayDi85 changed the title Run client under any java version and play on public server (possible macOS M1/2/3 fix) Run client under any java version and play on public servers (possible macOS M1/2/3 fix) Aug 31, 2024
@JayDi85
Copy link
Member Author

JayDi85 commented Sep 12, 2024

If you see pixelated images, icons and text then must disabled Windows's DPI-aware feature or add the follow additional launcher param for settings - java - client:

  • -Dsun.java2d.uiScale=1.0

@JayDi85 JayDi85 changed the title Run client under any java version and play on public servers (possible macOS M1/2/3 fix) Run client under any java version and play on public servers (macOS M1/2/3 fix and other) Sep 12, 2024
@JayDi85 JayDi85 changed the title Run client under any java version and play on public servers (macOS M1/2/3 fix and other) Run client/server under any java version and play on public servers (macOS M1/2/3 fix and other) Sep 13, 2024
JayDi85 added a commit that referenced this issue Sep 13, 2024
@JayDi85
Copy link
Member Author

JayDi85 commented Sep 13, 2024

Recommended java versions for maximum client-server compatibility (read "java 21" as any java 9+):

  • Server on java 8 - ✅ work by default
    • Clients on java 8 - ✅ work by default
    • Clients on java 21 - ⚠️ require add-opens and uiScale
  • Server on java 21 - ⚠️ require add-opens
    • Clients on java 8 - ✅ work by default, but server must run with add-opens
    • Clients on java 21 - ⚠️ require add-opens and uiScale

P.S. Look at starting comment for add-opens and uiScale params usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FAQ Instructions to fix problems linux / macos support Questions from users, help and support
Projects
None yet
Development

No branches or pull requests

1 participant