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

Error: Forge is missing some JVM options for reflective access #2221

Closed
janAkali opened this issue Jan 9, 2023 · 4 comments
Closed

Error: Forge is missing some JVM options for reflective access #2221

janAkali opened this issue Jan 9, 2023 · 4 comments

Comments

@janAkali
Copy link

janAkali commented Jan 9, 2023

Desktop (please complete the following information):

  • OS: Ubuntu Linux 18.04 aarch64
  • Forge: 1.6.54.SNAPSHOT-2023.1.8
  • Java: openjdk 17.0.5 2022-10-18

Describe the bug
When starting forge adventure mode with a shell script - it fails to load, showing a javaVM white error screen (see screenshot).

To Reproduce
Steps to reproduce the behavior:

  1. extract snapshot archive
  2. open terminal
  3. convert script to unix format: dos2unix forge-adventure.sh to fix #2220
  4. make script executable: sudo chmod +x forge-adventure.sh
  5. run the script with ./forge-adventure.sh
  6. See error

Expected behavior
Forge-adventure app starts and loads atleast to a menu.

Screenshots
java error

Affected files
https://github.com/Card-Forge/forge/blob/master/forge-gui-mobile-dev/src/main/config/forge-adventure.sh
https://github.com/Card-Forge/forge/blob/master/forge-adventure/src/main/config/forge-adventure-editor.sh

Fix proposed by kevlanhota on slightly-magic forum
I tested it and it fixes the problem.

#!/bin/sh
cd $(dirname "${0}")
java -Xmx4096m --add-opens java.desktop/java.beans=ALL-UNNAMED --add-opens java.desktop/javax.swing.border=ALL-UNNAMED --add-opens java.desktop/javax.swing.event=ALL-UNNAMED --add-opens java.desktop/sun.swing=ALL-UNNAMED --add-opens java.desktop/java.awt.image=ALL-UNNAMED --add-opens java.desktop/java.awt.color=ALL-UNNAMED --add-opens java.desktop/sun.awt.image=ALL-UNNAMED --add-opens java.desktop/javax.swing=ALL-UNNAMED --add-opens java.desktop/java.awt=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/java.math=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED -Dio.netty.tryReflectionSetAccessible=true -Dfile.encoding=UTF-8 -jar $project.build.finalName$
@tehdiplomat
Copy link
Contributor

Can you just push a PR rather than an issue that lists the files and the solution?

@janAkali
Copy link
Author

To be honest, I'm not a developer, so:

  1. I have no idea if it will break anything
  2. I've almost no experience with git (apart from simple cloning or actions available on website)
  3. with my shitty internet it'd take me hours to even clone the repo
  4. it's not my solution and it was given by an active developer, so I assumed it was a known issue.

@github-actions
Copy link

This issue has not been updated in a while and has now been marked as stale. Stale messages will be auto closed.

@github-actions
Copy link

github-actions bot commented May 4, 2023

This issue was closed because it has been stalled for 5 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants