All the Mods 7 - ATM7

All the Mods 7 - ATM7

3M Downloads

Simple Server Files Error: Could not find or load Main Class

razma417 opened this issue ยท 19 comments

commented

Hey Guys,

Attached is a picture of the error. I've attempted to create a server on every version from .20 to the newest .27 and this error occurs. I can browse to the location and see that that file is there, but it doesn't load it.

ATM 7 Server Error

commented

Installing JDK 17 seems to have fixed this problem for me as well.

commented

Installing JDK 17 seems to have fixed this problem for me as well.

commented

Hello, i have the same problem
any solution yet?

commented

There was an update today. Do you guys still get the same error? I'll try to look into it, but I don't know that much about the pack itself, I can only try to figure it out by the startserver.bat and args being loaded on the run.bat

I usually run my server running the startserver.bat, not the run.bat inside the setup folder. Try running if from outside, since this folder reference may be relative.

commented

yeah same thing and either the startserver.bat and the run.bat does not work here is the error form startserver.bat:
[INFO] Starting Loader, output incoming
Erreur : impossible de trouver ou charger la classe principale @libraries.net.minecraftforge.forge.1.17.1-37.0.109.win_args.txt
[18:49:15] [INFO] Server has been stopped, it has started 1 times in 60min
[18:49:15] [INFO] Restarting server in 10 seconds, press ctrl+c to stop

and the run.bat one:
C:\Users\Pc\Desktop\atm 7\SIMPLE-SERVER-FILES-0.0.31\setup>REM Forge requires a configured set of both JVM and program arguments.

C:\Users\Pc\Desktop\atm 7\SIMPLE-SERVER-FILES-0.0.31\setup>REM Add custom JVM arguments to the user_jvm_args.txt

C:\Users\Pc\Desktop\atm 7\SIMPLE-SERVER-FILES-0.0.31\setup>REM Add custom program arguments {such as nogui} to this file in the next line before the or

C:\Users\Pc\Desktop\atm 7\SIMPLE-SERVER-FILES-0.0.31\setup>REM pass them to this script directly

C:\Users\Pc\Desktop\atm 7\SIMPLE-SERVER-FILES-0.0.31\setup>java @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.17.1-37.0.109/win_args.txt
Erreur : impossible de trouver ou charger la classe principale @user_jvm_args.txt

C:\Users\Pc\Desktop\atm 7\SIMPLE-SERVER-FILES-0.0.31\setup>pause
Appuyez sur une touche pour continuer...

and also if i dont use a VPN to start it i get this one:
[18:51:16] [INFO] Testing http://example.com.
[18:51:16] [INFO] Reached http://example.com: false
[18:51:16] [INFO] Testing http://google.com.
[18:51:16] [INFO] Reached http://google.com: true
[18:51:16] [INFO] Reached 1 out of 2 IPs.
[18:51:16] [ERROR] Not every host could be reached. There could be a problem with your internet connection!!!!
[18:51:16] [ERROR] Problems with the Internet connection, shutting down.
Appuyez sur une touche pour continuer...

Thanks for trying to help us!!

ps: sorry my pc is in french :)

commented

I see. This is pretty interesting. Are you using a VPN? If so, why exactly?

This is pretty strange, since @user_jvm_args is actually a parameter/env stablished to be applied in the command.
Could you just open a shell (powershell on win) and check your Java version being used?
You can do that in any folder, really, and this will check the java that is in your PATH/EnvVariables. Since the command line just calls java directly.

image

Thinking more about this, startserver.bat/sh connects to servers to download all required scripts and stuff for the setup folder. This is actually already compiled to bytecode, and this repo doesn't contain the source of such .jar.

From my limited capabilities and reach, I can tell you that if you're being required to use a VPN or anything like this, you may have problems downloading required stuff to start the server OR your java is not being able to load the file @user_jvm_args.txt that actually only contains some more args for running the server.

In a ad-hoc solution you can edit "run.bat/sh" and manually add all parameters from "user_jvm_args.txt" and "libraries/net/minecraftforge/forge/1.17.1-37.0.109/win_args.txt".

But I'd still run from startserver.bat/sh, since some Path/EnvVariables seems to be set by the "serverstarter-2.2.0.jar" routine.

Version only without "user_jvm_args.txt":

REM Forge requires a configured set of both JVM and program arguments.
REM Add custom JVM arguments to the user_jvm_args.txt
REM Add custom program arguments {such as nogui} to this file in the next line before the %* or
REM  pass them to this script directly
java -Xmx6G @libraries/net/minecraftforge/forge/1.17.1-37.0.109/win_args.txt %*
pause

Version without any linkages, for forge/1.17.1-37.0.109 (ATM 0.0.31):

REM Forge requires a configured set of both JVM and program arguments.
REM Add custom JVM arguments to the user_jvm_args.txt
REM Add custom program arguments {such as nogui} to this file in the next line before the %* or
REM  pass them to this script directly
java -Xmx6G -p libraries/cpw/mods/bootstraplauncher/0.1.17/bootstraplauncher-0.1.17.jar;libraries/cpw/mods/securejarhandler/0.9.54/securejarhandler-0.9.54.jar;libraries/org/ow2/asm/asm-commons/9.1/asm-commons-9.1.jar;libraries/org/ow2/asm/asm-util/9.1/asm-util-9.1.jar;libraries/org/ow2/asm/asm-analysis/9.1/asm-analysis-9.1.jar;libraries/org/ow2/asm/asm-tree/9.1/asm-tree-9.1.jar;libraries/org/ow2/asm/asm/9.1/asm-9.1.jar
--add-modules ALL-MODULE-PATH
--add-opens java.base/java.util.jar=cpw.mods.securejarhandler
--add-exports java.base/sun.security.util=cpw.mods.securejarhandler
-DignoreList=bootstraplauncher-0.1.17.jar,securejarhandler-0.9.54.jar,asm-commons-9.1.jar,asm-util-9.1.jar,asm-analysis-9.1.jar,asm-tree-9.1.jar,asm-9.1.jar
-DlibraryDirectory=libraries
-DlegacyClassPath=libraries/cpw/mods/securejarhandler/0.9.54/securejarhandler-0.9.54.jar;libraries/org/ow2/asm/asm/9.1/asm-9.1.jar;libraries/org/ow2/asm/asm-commons/9.1/asm-commons-9.1.jar;libraries/org/ow2/asm/asm-tree/9.1/asm-tree-9.1.jar;libraries/org/ow2/asm/asm-util/9.1/asm-util-9.1.jar;libraries/org/ow2/asm/asm-analysis/9.1/asm-analysis-9.1.jar;libraries/net/minecraftforge/accesstransformers/8.0.4/accesstransformers-8.0.4.jar;libraries/org/antlr/antlr4-runtime/4.9.1/antlr4-runtime-4.9.1.jar;libraries/net/minecraftforge/eventbus/5.0.3/eventbus-5.0.3.jar;libraries/net/minecraftforge/forgespi/4.0.10/forgespi-4.0.10.jar;libraries/net/minecraftforge/coremods/5.0.1/coremods-5.0.1.jar;libraries/cpw/mods/modlauncher/9.0.7/modlauncher-9.0.7.jar;libraries/net/minecraftforge/unsafe/0.2.0/unsafe-0.2.0.jar;libraries/com/electronwill/night-config/core/3.6.3/core-3.6.3.jar;libraries/com/electronwill/night-config/toml/3.6.3/toml-3.6.3.jar;libraries/org/apache/maven/maven-artifact/3.6.3/maven-artifact-3.6.3.jar;libraries/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.jar;libraries/net/jodah/typetools/0.8.3/typetools-0.8.3.jar;libraries/org/apache/logging/log4j/log4j-api/2.14.1/log4j-api-2.14.1.jar;libraries/org/apache/logging/log4j/log4j-core/2.14.1/log4j-core-2.14.1.jar;libraries/net/minecrell/terminalconsoleappender/1.2.0/terminalconsoleappender-1.2.0.jar;libraries/org/jline/jline-reader/3.12.1/jline-reader-3.12.1.jar;libraries/org/jline/jline-terminal/3.12.1/jline-terminal-3.12.1.jar;libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar;libraries/org/spongepowered/mixin/0.8.4/mixin-0.8.4.jar;libraries/org/openjdk/nashorn/nashorn-core/15.3/nashorn-core-15.3.jar;libraries/com/google/guava/guava/21.0/guava-21.0.jar;libraries/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar;libraries/net/minecraftforge/fmlloader/1.17.1-37.0.109/fmlloader-1.17.1-37.0.109.jar;libraries/net/minecraft/server/1.17.1-20210706.113038/server-1.17.1-20210706.113038-extra.jar
cpw.mods.bootstraplauncher.BootstrapLauncher
--launchTarget forgeserver
--fml.forgeVersion 37.0.109
--fml.mcVersion 1.17.1
--fml.forgeGroup net.minecraftforge
--fml.mcpVersion 20210706.113038 %*
pause
commented

same thing here

commented

Hey guys. From what I noticed "@libraries/net/minecraftforge/forge/1.17.1-37.0.103/win_args.txt" is actually passed as extra argument with @user_jvm_args.txt inside the server folder, before running the game server.

One possible thing to check is to enter the "server" folder, possibly existing in the same path as the "startserver" executable and first check if inside "libraries/net/minecraftforge/forge/1.17.1-37.0.103" exists a file called "win_args.txt" or "unix_args.txt" (windows and linux environments repectivelly). They both have various arguments for forge. If you need, I can upload them both here later.

Secondly, you guys can open the "run" executable file inside the "server" folder as text (can be any text editor) and check if it's content is like the one below:

Windows:

REM Forge requires a configured set of both JVM and program arguments.
REM Add custom JVM arguments to the user_jvm_args.txt
REM Add custom program arguments {such as nogui} to this file in the next line before the %* or
REM  pass them to this script directly
java @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.17.1-37.0.103/win_args.txt %*
pause

Linux:

#!/usr/bin/env sh
# Forge requires a configured set of both JVM and program arguments.
# Add custom JVM arguments to the user_jvm_args.txt
# Add custom program arguments {such as nogui} to this file in the next line before the "$@" or
#  pass them to this script directly
java @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.17.1-37.0.103/unix_args.txt "$@"

I hope you guys can run your servers :)

commented

i do have both file and have verified the run executable but it still does not work the file is not name server its name setup i tried to change it to server but i got many more error

commented

I got the same problem. The run.bat file seems correct and the file win_args.txt exists in the right location. however running the run.bat file gives the error: Could not find or load main class @user_jvm_args.txt instead of the win_args.txt error.

commented

Same error for myself, ran simpleserver setup everything installs/downloads, then at the end the same error as above. Attempted to manually add the above text to the files but same error. Tried running as admin incase something was not being installed and do not use a vpn but no luck :( Error: Could not find or load main class @libraries.net.minecraftforge.forge.1.17.1-37.0.109.win_args.txt

commented

did anyone figure this out/come up with a solution?

commented

after days of trying to get this working for my group, i was forced to give up and revert back to 1.16.5 with great disappointment and shame:) Hope this is rectified soon.

commented

after days of trying to get this working for my group, i was forced to give up and revert back to 1.16.5 with great disappointment and shame:) Hope this is rectified soon.

I found a solution (at least for myself). I was able to fix the issue by installing Java 16 (for 1.17.1) and Java 17 (for 1.18), hopefully this helps!

commented

after days of trying to get this working for my group, i was forced to give up and revert back to 1.16.5 with great disappointment and shame:) Hope this is rectified soon.

I found a solution (at least for myself). I was able to fix the issue by installing Java 16 (for 1.17.1) and Java 17 (for 1.18), hopefully this helps!

It did help, installed Jdk 16 and dedicated server managed to start. Glad someone figured it out ๐Ÿ‘

commented

after days of trying to get this working for my group, i was forced to give up and revert back to 1.16.5 with great disappointment and shame:) Hope this is rectified soon.

I found a solution (at least for myself). I was able to fix the issue by installing Java 16 (for 1.17.1) and Java 17 (for 1.18), hopefully this helps!

I had the same problem and installing Java 17 helped me (I was trying to run 1.18 server)

commented

I had the same problem and installing Java 17 helped me (I was trying to run 1.18 server)

I've always used java 8 up until 1.16, have not hosted since. Where do I find these new versions of Java? The standard x64 only shows Java 8

commented

I had the same problem and installing Java 17 helped me (I was trying to run 1.18 server)

I've always used java 8 up until 1.16, have not hosted since. Where do I find these new versions of Java? The standard x64 only shows Java 8

https://www.oracle.com/java/

commented

Thanks for reporting this issue, however, ATM7 1.17 is no longer being supported by the team and will no longer get updates. If this issue is still happening in ATM7 1.18.1 please let us know in a new issue.