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
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
Do java -version rq
I suspect it's not actually using java 8
where should I put that?
In command prompt
or powershell
whatever
In the same console you ran the start command in
Make sure it's in the same folder as your server files
they're double clicking a 🦇
ðŸ˜
!cmd
Alr ig
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)
e voila
yeah that’s running Java 21
I'm the goat 😂
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
Where would I put that in the run.bat file. In replace of the word java?
yep
Like that "C:\Program Files (x86)\Java\jre1.8.0_431\bin\java.exe" -Xmx8192M -Xms8192M -jar forge.jar nogui
Pause
yyyep
Make sure you have it installed.
It is now saying this Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap
How much RAM is on your PC total
32 Gb
Can you check task manager and make sure that less than 30GB are being used lol?
Chances are it's not
but
Preallocated heap?
okay so that's weird
hmm
Ohkay...
Run as admin?
The run.bat file?
Yup
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 . . .
Hm
Run java -version again rq
Sry not java version
I'm really hoping you didn't accidentally install 32 bit java 8 😂
That should give a different error
'C:\Users\Administrator\Desktop\SkyFactory' is not recognized as an internal or external command,
operable program or batch file.
:skul:
no
"C:\Program Files (x86)\Java\jre1.8.0_431\bin\java.exe" -version
It said Access is denied. ???
With this popup
I downloaded from this site https://www.java.com/download/ie_manual.jsp
download java from adoptium vs That
This one?
This one?
yes the MSI
jre or jdk, either or is fine
Where would that download. I can't find it?
somewhere in program files iirc
its own adoptium folder
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
can you
!Paste
!paste
its a command that you read and follow the instructions to
Okay, for some reason my lastest.log is not working and it is old thig and does not inclide the error
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
run.bat
i want what the Inside of run.bat looks like
not the folder structure
Sorry
yeah thats not how you do it
Oh. Can you help?
nope just gonna sit here and watch
ofc im gonna help if im typing
lol
do java "file path you have" vs just the file path there
This is with no quotes https://mclo.gs/WLM2mZF
With quotes
since there is spaces in the path you need to have quote
what skyfactory are you tryna run
This one but I don't have any mods yet I am just trying to get it started before adding mods
CurseForge
SkyFactory 4
The ultimate skyblock modpack! Watch development at: darkosto.tv/SkyFactoryLive
11.9M Downloads | Modpacks
so why are you trying to do this vs using the skyfactory 4 server pack?
CurseForge
Download SkyFactory 4
The ultimate skyblock modpack! Watch development at: darkosto.tv/SkyFactoryLive
@nicko run
java -jar forge-1.12.2-14.23.5.2860-installer.jar --installServer .
no need for that IF he doesnt have the proper serverpack for the modpack
the serverpack needs you to run the installer
there's no included libraries in the server pack. You must run the installer
run an installer -> start server
:shrug:
vs like
manually doing it all
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
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
use serverpack creator
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.
ftb has a special thing for server packs
ah right
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
the ftb installer (at least for the stoneblock pack) will install the correct version of java and the correct version of forge automatically
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
wasn’t properly made and setup
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
Closed post!
Your post has been marked as solved!
Requested by nicko500#0