Problem with server hosting (sorry if this isn't allowed)

Hosting a forge server on 1.21. Only mod is simpleships. Server works great, other people can join, portforwarding not an issue (promise.) I just can't join on a clinet on the same computer - I get: java.lang.NoClassDefFoundError: com/google/common/collect/Maps$9 I guess it's just using the wrong java? I'm not sure how to solve this though. Please forgive if this isn't allowed here, I'm desperate
38 Replies
Admincraft Meta
Admincraft Meta8mo 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 ryeob02#0
ryeob02
ryeob02OP8mo ago
Eventually works if i relaunch launcher a million times and pray to the spaghetti god, but not exactly ideal. Any ideas?
QarthO
QarthO8mo ago
are u using 'localhost' to join if ur trying to connect from the same pc?
ryeob02
ryeob02OP8mo ago
yeah, have also tried my actual ip and my local ip
QarthO
QarthO8mo ago
i would just make sure u have the exact same mod on the client as the server Exact same forge version (not just minecraft version) and exact same java version
ryeob02
ryeob02OP8mo ago
the only hangup i can see is the java version client runs fine without, but server requires java 21+ then when i add java 21+, this problem occurs uninstall it, server wont start. install it, can't join on client
QarthO
QarthO8mo ago
you cant run minecraft 1.21 unless u have java 21+
ryeob02
ryeob02OP8mo ago
vicious cycle of banging my head against the wall
QarthO
QarthO8mo ago
period.
ryeob02
ryeob02OP8mo ago
well i believe you uh lemme give er a peek
QarthO
QarthO8mo ago
its not a matter of believing its a fact if u "think" otherwise u are either not running minecraft 1.21, or u are actually running java 21 when u think u arent
ryeob02
ryeob02OP8mo ago
investigating ok have uninstalled all versions except for jdk22 can confirm issue is still happening
QarthO
QarthO8mo ago
lets just start over how are u running the server? is on a windows pc? running a startup script?
ryeob02
ryeob02OP8mo ago
windows pc using default forge run.bat
QarthO
QarthO8mo ago
ok can u share the contents of that run.bat file
ryeob02
ryeob02OP8mo ago
sure. you wnat the file or copypasted into chat?
QarthO
QarthO8mo ago
copy paste the contents
but in a code block
but in a code block
ryeob02
ryeob02OP8mo ago
@echo off
REM Add custom JVM arguments (such as RAM allocation) to the user_jvm_args.txt

java -jar forge-1.21-51.0.29-shim.jar --onlyCheckJava
if %ERRORLEVEL% NEQ 0 (
echo.
echo If you're struggling to fix the error above, ask for help on the forums or Discord mentioned in the readme.
goto :exit
)

REM Add custom program arguments (such as nogui) to the next line before the %* or pass them to this script directly
java @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.21-51.0.29/win_args.txt nogui%*

:exit
pause
@echo off
REM Add custom JVM arguments (such as RAM allocation) to the user_jvm_args.txt

java -jar forge-1.21-51.0.29-shim.jar --onlyCheckJava
if %ERRORLEVEL% NEQ 0 (
echo.
echo If you're struggling to fix the error above, ask for help on the forums or Discord mentioned in the readme.
goto :exit
)

REM Add custom program arguments (such as nogui) to the next line before the %* or pass them to this script directly
java @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.21-51.0.29/win_args.txt nogui%*

:exit
pause
QarthO
QarthO8mo ago
ok open up a command prompt
ryeob02
ryeob02OP8mo ago
sure
QarthO
QarthO8mo ago
type java --version
ryeob02
ryeob02OP8mo ago
java 22.0.2 2024-07-16
Java(TM) SE Runtime Environment (build 22.0.2+9-70)
Java HotSpot(TM) 64-Bit Server VM (build 22.0.2+9-70, mixed mode, sharing)
java 22.0.2 2024-07-16
Java(TM) SE Runtime Environment (build 22.0.2+9-70)
Java HotSpot(TM) 64-Bit Server VM (build 22.0.2+9-70, mixed mode, sharing)
QarthO
QarthO8mo ago
ok, now open up minecraft
ryeob02
ryeob02OP8mo ago
k
QarthO
QarthO8mo ago
also launch the server and share the logs upload to mclogs
ryeob02
ryeob02OP8mo ago
servers up ppl are playing rn lol
QarthO
QarthO8mo ago
ok can u still share the latest log?
ryeob02
ryeob02OP8mo ago
yea there u go
QarthO
QarthO8mo ago
can u do the same with your client logs?
ryeob02
ryeob02OP8mo ago
uhh yh
ryeob02
ryeob02OP8mo ago
QarthO
QarthO8mo ago
well ur client is running java 21 try having ur client run java 22 i dont think this should matter, but doesnt hurt to try
ryeob02
ryeob02OP8mo ago
i can give it a go as far as i understand i have java 22 installed? not sure can you send a link to a java 22 download?
QarthO
QarthO8mo ago
what kind of client are u using
ryeob02
ryeob02OP8mo ago
?
QarthO
QarthO8mo ago
how are u starting minecraft modrinth launcher? curseforge? prism?
ryeob02
ryeob02OP8mo ago
uh default launcher vanilla launcher* heading to bed. praying for this to magically resolve by tomorrow

Did you find this page helpful?