#Need help figuring out the cause of JVM Errors

87 messages · Page 1 of 1 (latest)

storm thunder
#

For the past 2 days i have been trying to get my brothers minecraft launcher to launch minecraft but **it keeps giving me the JVM error "A Java exception has occurred."**when trying to launch the game in 1.19. When typing "Java --version" into CMD I get the java version so I am guessing that this problem is from the Java Virtual Machine itself. Here is a list of things that I tried:

  • I have increased the memory allocation of Java in my Advanced System Settings.
  • I reinstalled Java twice
  • I reinstalled Minecraft a couple of times
  • I tried to change the path in Advanced System Settings
  • I ran Java as Admin to no avail
    -I have installed both Java 8 and Java 19
  • Launching Minecraft in 1.12 doesn't even show me a JVM window it just tells me "Exit Code:1" in the Minecraft Launcher

I couldn't find anything on the internet and I wasn't able to find any crash logs when i tried to look for it to actually try to fix the issue. Does anyone have any solutions I can try? I know that this question isn't really about Java coding but i've asked everywhere and nobody was able to help me. Any kind of help is appreciated.
(Note: my OS is the latest version of Windows 11.)

dapper creekBOT
#

This post has been reserved for your question.

Hey @storm thunder! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

normal rune
#

What's the actual output of java -version?

#

Is there an environment variable called JAVA_TOOL_OPTIONS or something like that?

storm thunder
storm thunder
normal rune
#

ok that seems fine so far

#

In Minecraft, can you configure Java Executable and JVM arguments?

#

in the launcher

storm thunder
#

Yes i can

normal rune
#

Can you show them?

#

like the values

storm thunder
#

For JVM Arguments i have
-Xmx4G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M

#

The java exucutable just says "<Use bundled Java Runtime>"

normal rune
#

What's the output of java -Xmx4G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M -version?

storm thunder
#

It doesnt really give me an output

#

do you mean when plugging in into cmd?

#

when plugging it into cmd it gives the same thing as before
java version "19.0.1" 2022-10-18
Java(TM) SE Runtime Environment (build 19.0.1+10-21)
Java HotSpot(TM) 64-Bit Server VM (build 19.0.1+10-21, mixed mode, sharing)

normal rune
#

maybe change the bundled runtime to your Java installation?

#

Is it standard Minecraft or is it modified?

storm thunder
#

Its just standard

#

I think i already tried to do that but ill try again

#

It gives me the error:
Unable to start Java.
Error details: The requested operation requires elevation.
Filename on disk: java.exe
Path: C:\Program Files\Java\jdk-19\bin\java.exe
Exists: File

normal rune
#

that probably means you need to run it as admin

#

elevation normally means more permissions

#

although that's kinda weird

storm thunder
#

In properties run program as admin is ticked

#

cant even untick it

normal rune
#

that shouldn't be ticked normally

storm thunder
#

Huh

normal rune
#

Did you enable/tick that?

storm thunder
#

No

normal rune
#

Does your user have permissions to access it?

dapper creekBOT
normal rune
#

try uninstalling your current Java version and install it from there ^

#

maybe that works

storm thunder
#

Ok ill try

#

ok i downloaded it

#

Minecraft still won't launch

#

same error

#

Plugging in "java --version" into cmd gives me
Picked up _JAVA_OPTIONS: -Xmx1024M
openjdk 17.0.5 2022-10-18
OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8)
OpenJDK 64-Bit Server VM Temurin-17.0.5+8 (build 17.0.5+8, mixed mode, sharing)

#

So im pretty sure it installed correctly

normal rune
#

then select that in Minecraft

#

and if it doesn't work, edit your environment variables and remove _JAVA_OPTIONS

storm thunder
#

So just delete _JAVA_OPTIONS and keep the -Xmx part?

#

Or remove the entire variable

normal rune
#

remove the whole variable

#

and restart

storm thunder
#

Same error

#

Ok wait

#

When i launch the game a Command window pops up for a second then crashes and turns me back to the minecraft launcher

#

It doesnt show the regular JVM Error window where it says "A Java exception has occurred."

#

The minecraft laucnher tho still shows the same error window which is just "An Unexpected issue occurred and the game has crashed. We're Sorry for the inconvewnience. Exit Code: 1"

normal rune
#

are you fast enough for that?

#

If you can get that, it might show you the actual error

storm thunder
#

ill try to screen record

#

and then screenshot

normal rune
#

the cmd window appears because you are using java.exe instead of javaw.exe but it just means open a cmd window and show errors there (if errors happen)

#

👍

storm thunder
#

the command window is empty

#

thats the last frame it was visible

storm thunder
#

@normal rune?

storm thunder
#

@normal rune I was able to find the output log!

#

23:14:45.095 Using default game log configuration client-1.12.xml (outputs XML) 23:14:46.026 Exception in thread "main" java.util.ServiceConfigurationError: org.slf4j.spi.SLF4JServiceProvider: Error accessing configuration file at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:586) at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.parse(ServiceLoader.java:1180) at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1213) at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1228) at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273) at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309) at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393) at org.slf4j.LoggerFactory.findServiceProviders(LoggerFactory.java:104) at org.slf4j.LoggerFactory.bind(LoggerFactory.java:147) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:139) at org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:422) at org.slf4j.MarkerFactory.<clinit>(MarkerFactory.java:52) at com.mojang.logging.LogUtils.<clinit>(LogUtils.java:18) at net.minecraft.client.main.Main.<clinit>(SourceFile:42) Caused by: java.nio.file.NoSuchFileException: C:\Users\Hello World at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85) at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103) at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108) at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:53) at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38) at java.base/sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:199) at java.base/java.nio.file.Files.readAttributes(Files.java:1851) at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1264) at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:709) at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:243) at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:172) at java.base/java.util.jar.JarFile.<init>(JarFile.java:347) at java.base/sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:103) at java.base/sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:72) at java.base/sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:191) at java.base/sun.net.www.protocol.jar.JarFileFactory.getOrCreate(JarFileFactory.java:91) at java.base/sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:132) at java.base/sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:175) at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.parse(ServiceLoader.java:1172) ... 12 more 23:14:46.027 Process crashed with exit code 1

#

this was everything that was outputed when launching the game

#

I don't know what any of this means but i hope this can help!

normal rune
#

Is Hello World your username?

#

that seems more like a problem with Minecraft itself to be honest

#

Are you using a modified version of Minecraft?

storm thunder
storm thunder
normal rune
#

and maybe it helps to reinstall Minecraft

#

Make sure there is no ! in the username

#

it might be because of the way Java interprets JAR URLs...

storm thunder
#

Yeah I just made a new user named No and it worked perfectly

#

So it was all from the user name that i picked when i built the pc huh 😅

#

Thanks for the help big guy and sorry for taking so much time out of your day 🙏

#

You don't know how grateful I am ☺️

#

I can finally go sleep. Bye Bye!