forge run.sh script question

Looking at the script, I see: java @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.18.2-40.2.9/unix_args.txt "$@" It all makes sense, but I am confused as normally when starting a vanilla server, you would have -jar server.jar at the end of the line and I expected this would be in the unix_args.txt file, but it is not so I am looking for help understanding how it actually starts the forge-1.18.2-40.2.9-universal.jar server?
6 Replies
Admincraft Meta
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 solverz#0
Discount Milk
Discount Milk2y ago
Forge doesn't start a jar file itself.
Solverz
SolverzOP2y ago
Yes, but the run.sh script must use the -jar server.jar flag? Otherwise how would the jar file be run
Ralex
Ralex2y ago
-jar is not required. The txt file it points to tells Java what to do
Solverz
SolverzOP2y ago
This is what I want to understand, what in the txt file starts the .jar ? Note: I know it does work, but for my curiosity I would like to understand
Ralex
Ralex2y ago
You can read it, it's loading up all the files it needs, and uses -cp to specify the class it needs to load

Did you find this page helpful?