A
Admincraft•3w ago
nicko

Trying to have a 1.12.2 server with java 8 not working

I am getting this error message. I am trying to set up a stoneblock 2 server and have other servers set up with Java 17 and they work fine. I am getting this error code, I have tried to fix it with other soultions from reddit but have had no luck. Any help would be much apprecited. C:\Users\Administrator\Desktop\Sky Factory>java -Xmx8192M -Xms8192M -jar forge.jar nogui A problem occurred running the Server launcher.java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:109) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:70) at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:34) Caused by: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap') at net.minecraft.launchwrapper.Launch.<init>(Launch.java:34) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ... 3 more C:\Users\Administrator\Desktop\Sky Factory>Pause Press any key to continue . . .
83 Replies
Admincraft Meta
Admincraft Meta•3w ago
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close !close !solved !answered
Requested by nicko500#0
Ashank
Ashank•3w ago
Do java -version rq I suspect it's not actually using java 8
nicko
nickoOP•3w ago
where should I put that?
Skullians
Skullians•3w ago
In command prompt or powershell whatever
Ashank
Ashank•3w ago
In the same console you ran the start command in Make sure it's in the same folder as your server files
Loudbook
Loudbook•3w ago
they're double clicking a 🦇
Ashank
Ashank•3w ago
😭 !cmd Alr ig
nicko
nickoOP•3w ago
java version "21.0.4" 2024-07-16 LTS Java(TM) SE Runtime Environment (build 21.0.4+8-LTS-274) Java HotSpot(TM) 64-Bit Server VM (build 21.0.4+8-LTS-274, mixed mode, sharing)
Loudbook
Loudbook•3w ago
e voila
Skullians
Skullians•3w ago
yeah that’s running Java 21
Ashank
Ashank•3w ago
I'm the goat 😂
Skullians
Skullians•3w ago
you can either change your java home, or in the startup command for sky factory specify a path to the java 8 java.exe file Which replaces ‘Java’ at the start
nicko
nickoOP•3w ago
Where would I put that in the run.bat file. In replace of the word java?
Loudbook
Loudbook•3w ago
yep
nicko
nickoOP•3w ago
Like that "C:\Program Files (x86)\Java\jre1.8.0_431\bin\java.exe" -Xmx8192M -Xms8192M -jar forge.jar nogui Pause
Loudbook
Loudbook•3w ago
yyyep
Ashank
Ashank•3w ago
Make sure you have it installed.
nicko
nickoOP•3w ago
It is now saying this Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap
Loudbook
Loudbook•3w ago
How much RAM is on your PC total
nicko
nickoOP•3w ago
32 Gb
Loudbook
Loudbook•3w ago
Can you check task manager and make sure that less than 30GB are being used lol? Chances are it's not but
Ashank
Ashank•3w ago
Preallocated heap?
nicko
nickoOP•3w ago
No description
Loudbook
Loudbook•3w ago
okay so that's weird hmm
Ashank
Ashank•3w ago
Ohkay... Run as admin?
nicko
nickoOP•3w ago
The run.bat file?
Ashank
Ashank•3w ago
Yup
nicko
nickoOP•3w ago
Same thing C:\Users\Administrator\Desktop\Sky Factory>"C:\Program Files (x86)\Java\jre1.8.0_431\bin\java.exe" -Xmx2048M -Xms2048M -jar forge.jar nogui Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap C:\Users\Administrator\Desktop\Sky Factory>Pause Press any key to continue . . .
Ashank
Ashank•3w ago
Hm Run java -version again rq Sry not java version
C:\Users\Administrator\Desktop\Sky Factory>"C:\Program Files (x86)\Java\jre1.8.0_431\bin\java.exe" -version
C:\Users\Administrator\Desktop\Sky Factory>"C:\Program Files (x86)\Java\jre1.8.0_431\bin\java.exe" -version
I'm really hoping you didn't accidentally install 32 bit java 8 😂
Loudbook
Loudbook•3w ago
That should give a different error
nicko
nickoOP•3w ago
'C:\Users\Administrator\Desktop\SkyFactory' is not recognized as an internal or external command, operable program or batch file.
Loudbook
Loudbook•3w ago
:skul: no "C:\Program Files (x86)\Java\jre1.8.0_431\bin\java.exe" -version
nicko
nickoOP•3w ago
It said Access is denied. ???
nicko
nickoOP•3w ago
With this popup
No description
nicko
nickoOP•3w ago
Tamz
Tamz•3w ago
download java from adoptium vs That
nicko
nickoOP•3w ago
This one?
No description
nicko
nickoOP•3w ago
This one?
Tamz
Tamz•3w ago
yes the MSI jre or jdk, either or is fine
nicko
nickoOP•3w ago
Where would that download. I can't find it?
Tamz
Tamz•3w ago
somewhere in program files iirc its own adoptium folder
nicko
nickoOP•3w ago
It now says this openjdk version "1.8.0_432" OpenJDK Runtime Environment (Temurin)(build 1.8.0_432-b06) OpenJDK 64-Bit Server VM (Temurin)(build 25.432-b06, mixed mode) Is that better? It is now saying this 2024-12-29 21:56:25,541 main ERROR Error processing element Queue ([Appenders: null]): CLASS_NOT_FOUND 2024-12-29 21:56:25,643 main WARN Disabling terminal, you're running in an unsupported environment. 2024-12-29 21:56:25,726 main ERROR Unable to locate appender "ServerGuiConsole" for logger config "root" [21:56:25] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLServerTweaker [21:56:25] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLServerTweaker [21:56:25] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLServerTweaker A problem occurred running the Server launcher.java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:70) at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:34) Caused by: java.lang.NoClassDefFoundError: com/google/common/collect/Lists at net.minecraftforge.fml.common.launcher.FMLTweaker.acceptOptions(FMLTweaker.java:69) at net.minecraftforge.fml.common.launcher.FMLServerTweaker.acceptOptions(FMLServerTweaker.java:36) at net.minecraft.launchwrapper.Launch.launch(Launch.java:114) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) ... 6 more Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Lists at java.net.URLClassLoader.findClass(URLClassLoader.java:387) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ... 10 more
Tamz
Tamz•3w ago
can you !Paste
Carl-bot
Carl-bot•3w ago
You should not post your logs in-line or screenshots of your console, it makes it harder to process and us slower to reply
Use a paste service of your choice, or mclogs supporting log syntax highlight and IP filtering
Admincraft Canned Responses
nicko
nickoOP•3w ago
!paste
Carl-bot
Carl-bot•3w ago
You should not post your logs in-line or screenshots of your console, it makes it harder to process and us slower to reply
Use a paste service of your choice, or mclogs supporting log syntax highlight and IP filtering
Admincraft Canned Responses
Tamz
Tamz•3w ago
its a command that you read and follow the instructions to
nicko
nickoOP•3w ago
Okay, for some reason my lastest.log is not working and it is old thig and does not inclide the error
Tamz
Tamz•3w ago
what file are you launching to start the server and what does your file data look like from the inside. screenshot it and send here
nicko
nickoOP•3w ago
run.bat
nicko
nickoOP•3w ago
No description
Tamz
Tamz•3w ago
i want what the Inside of run.bat looks like not the folder structure
nicko
nickoOP•3w ago
Sorry
No description
Tamz
Tamz•3w ago
yeah thats not how you do it
nicko
nickoOP•3w ago
Oh. Can you help?
Tamz
Tamz•3w ago
nope just gonna sit here and watch ofc im gonna help if im typing
nicko
nickoOP•3w ago
lol
Tamz
Tamz•3w ago
do java "file path you have" vs just the file path there
nicko
nickoOP•3w ago
This is with no quotes https://mclo.gs/WLM2mZF
Tamz
Tamz•3w ago
With quotes since there is spaces in the path you need to have quote
Tamz
Tamz•3w ago
what skyfactory are you tryna run
nicko
nickoOP•3w ago
This one but I don't have any mods yet I am just trying to get it started before adding mods
nicko
nickoOP•3w ago
CurseForge
SkyFactory 4
The ultimate skyblock modpack! Watch development at: darkosto.tv/SkyFactoryLive 11.9M Downloads | Modpacks
Tamz
Tamz•3w ago
so why are you trying to do this vs using the skyfactory 4 server pack?
Tamz
Tamz•3w ago
CurseForge
Download SkyFactory 4
The ultimate skyblock modpack! Watch development at: darkosto.tv/SkyFactoryLive
Snow Kit
Snow Kit•3w ago
@nicko run java -jar forge-1.12.2-14.23.5.2860-installer.jar --installServer .
Tamz
Tamz•3w ago
no need for that IF he doesnt have the proper serverpack for the modpack
Snow Kit
Snow Kit•3w ago
the serverpack needs you to run the installer
Snow Kit
Snow Kit•3w ago
there's no included libraries in the server pack. You must run the installer
No description
Tamz
Tamz•3w ago
run an installer -> start server :shrug: vs like manually doing it all
nicko
nickoOP•3w ago
I am extracting/unzipping the serverpack right now. I also want to create a stoneblock 2 server though. So I will have to do that one manually
nicko
nickoOP•3w ago
CurseForge
FTB Presents Stoneblock 2
The Stoneblock you like, now just even better then before! New mods, new dimensions, and new bosses! 4.1M Downloads | Modpacks
Tamz
Tamz•3w ago
use serverpack creator
Snow Kit
Snow Kit•3w ago
Feed The Beast
Feed The Beast
FTB is a UK based company and community platform that creates innovative mods, maps, and mod packs for Minecraft on the Java and Bedrock editions.
Snow Kit
Snow Kit•3w ago
ftb has a special thing for server packs
Tamz
Tamz•3w ago
ah right
nicko
nickoOP•3w ago
I will check that out. Thank you so much. I belive that the errors will still happen though. I don't think it is based on the mods but 1.12.2 and java 8 in general
Snow Kit
Snow Kit•3w ago
the ftb installer (at least for the stoneblock pack) will install the correct version of java and the correct version of forge automatically
nicko
nickoOP•3w ago
I will finish installing those 2 serverpacks and get back to you guys. Thank you for all the help That worked thank you so much. Do you know why is wasent working maunally though @ClydeThat worked thank you so much. Do you know why is wasent working maunally though @Snow KitThat worked thank you so much. Do you know why is wasent working maunally though
Tamz
Tamz•3w ago
wasn’t properly made and setup
nicko
nickoOP•3w ago
Okay, Thank you for the help it is working good and I don't think I want to set up any other 1.12.2 server !answered
Admincraft Meta
Admincraft Meta•3w ago
Closed post!
Your post has been marked as solved!
Requested by nicko500#0

Did you find this page helpful?