When trying to run a 1.12.2 forger server in this state, the following error message appears. Java -Xms10G -Xmx10G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:-OmitStackTraceInFastThrow -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=8 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:MaxTenuringThreshold=1 =true =true -jar forge-1.12.2-14.jar -nogui When I type java -version in command prompt, java 16 shows up. I've installed 2 versions of java, 8 and 16. The 1.12.2 server starts when I uninstall JRE 16. Only the 1.17 servers start with this installation set up. I am running JRE 16 and Java 8 on the same computer.
How to run minecraft server jar how to#
I don't know how to resolve the error of the java class not being found. The error given is: Error: Could not find or load main class C:\Program Files\Java\jre1.8.0_291\bin\java.exeĬaused by: : C:\Program Files\Java\jre1.8.0_291\bin\java.exe Java -Xms10G -Xmx10G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:-OmitStackTraceInFastThrow -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=8 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:MaxTenuringThreshold=1 =true =true "C:\Program Files\Java\jre1.8.0_291\bin\java.exe" -jar forge-1.12.2-14.jar -nogui bat file is "C:\Program Files\Java\jre1.8.0_291\lib" -jar but it doesn't work. I want to run two servers, one in 1.17 using Java 16 and the other in 1.12.2 using Java 8.