Java version problems

InaccessibleObjectException: Unable to make OperatingSystemImpl.getTotalPhysicalMemorySize() accessible

What the log looks like

java\.lang\.reflect\.InaccessibleObjectException: Unable to make public long com\.sun\.management\.internal\.OperatingSystemImpl\.getTotalPhysicalMemorySize\(\) accessible
module jdk\.management does not "opens com\.sun\.management\.internal" to unnamed module

How to fix it

  1. Download and install the latest version of your launcher (for example, grab the newest ATLauncher release from its official website), as modern versions natively support newer Java releases.
  2. If you need to use an older launcher .jar file, install Java 8 and run the file using the direct path to your Java 8 executable (for example, /usr/lib/jvm/java-8-openjdk/bin/java -jar ATLauncher.jar on Linux) or set Java 8 as your default system Java.
  3. Alternatively, if starting from a terminal with Java 9 or newer, pass the module-opening flag before -jar: java --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED -jar ATLauncher.jar
LoadersVanilla, Forge, Fabric
SeverityStops the game
CategoryJava version problems

Check your own log

Related errors