Single Player JNI Error

Having issues? Ask here!
Forum rules
- Search for existing answers before creating a new topic
- Topic titles must be descriptive and searchable
- Duplicate questions will be redirected to the existing answer(s) and locked.
Locked
User avatar
mstrzero
Noob
Posts: 3
Joined: Sat Feb 03, 2024 9:57 am

Single Player JNI Error

Post by mstrzero »

New to 2009scape, just downloaded the launcher and followed instructions for single player and got this

Starting Singleplayer.. The Singleplayer client will launch when 2009scape is ready. Sit tight!
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: core/Server has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
User avatar
ryannathans
Staff
Posts: 501
Joined: Thu Aug 11, 2022 12:25 am
Location: ɐᴉlɐɹʇsn∀
Has thanked: 40 times
Been thanked: 96 times

Re: Single Player JNI Error

Post by ryannathans »

Please paste your java path from the launcher settings
User avatar
Red Bracket
Retired Staff
Posts: 321
Joined: Thu Aug 11, 2022 7:18 am
Location: Varrock West Bank
Has thanked: 307 times
Been thanked: 76 times
Contact:

Re: Single Player JNI Error

Post by Red Bracket »

Java launcher settings might be removed in most recent versions, because the launcher automatically tries to use Java 11.

OP can you try simply connecting to the live server first, then close it, and run singleplayer again? This should force it to use the correct path.
User avatar
mstrzero
Noob
Posts: 3
Joined: Sat Feb 03, 2024 9:57 am

Re: Single Player JNI Error

Post by mstrzero »

C:\Program Files\Java\jre1.8.0_311\bin/java.exe
That is the requested java path from launcher settings.


As for trying to connect to the live server, it does seem that I can get to the log in screen. I don't particularly want to create an account if I don't have to though... Anyway opening and closing this doesn't make singleplayer work.
User avatar
ryannathans
Staff
Posts: 501
Joined: Thu Aug 11, 2022 12:25 am
Location: ɐᴉlɐɹʇsn∀
Has thanked: 40 times
Been thanked: 96 times

Re: Single Player JNI Error

Post by ryannathans »

mstrzero wrote: Sat Feb 03, 2024 12:39 pm C:\Program Files\Java\jre1.8.0_311\bin/java.exe
That is the requested java path from launcher settings.


As for trying to connect to the live server, it does seem that I can get to the log in screen. I don't particularly want to create an account if I don't have to though... Anyway opening and closing this doesn't make singleplayer work.
this is the wrong version of java, you should be using java 11
User avatar
mstrzero
Noob
Posts: 3
Joined: Sat Feb 03, 2024 9:57 am

Re: Single Player JNI Error

Post by mstrzero »

Ah. I see. Thank you, seems to be working fine now.
User avatar
Ceikry
Site Admin
Posts: 587
Joined: Wed Aug 10, 2022 11:48 pm
Location: Draynor Village
Has thanked: 82 times
Been thanked: 105 times

Re: Single Player JNI Error

Post by Ceikry »

The correct java version is explicitly mentioned several times in FAQs and other places. Please check FAQs before creating bug reports and forum posts.
Nerds
Locked