How To Fix Minecraft Server Batch (.bat) File Cmd Closing Instantly Without Generating Any Files
Websplaining
How To Fix Minecraft Server Batch (.bat) File Command Prompt (cmd) Closing Instantly Without Generating Any Files
In this video, I will show you how to fix your issue with your Minecraft: Java Edition Server, not generating any of the essential server files such as eula.txt when attempting to the run your batch file. If your batch file is closing instantly, popping up/flashing for a split second, or closing without creating the following files: logs folder, eula.txt, and server.properties then you're on the right video.
Steps To Fix Minecraft Server Batch (.bat) File Command Prompt (Cmd) Closing Instantly Without Generating Any Files:
- Locate and open your Minecraft server folder that contains your Minecraft server files.
- Once done, right click on the batch file and click on edit to open your batch file in a text document such as windows notepad,
- To the line below your server run command, add the word "pause" and then click on file at the top left hand corner and then click on save to save the changes you have just made your your batch file containing your Minecraft run server command.
- Double click on your batch file to attempt to run your server. If your server does unsuccessful in generating the Minecraft server files, you will instead see the reason why in the CMD terminal window. This is because you added the word "pause" which prevents the Command Prompt from closing instantly.
Below are four solutions with the corresponding CMD outputs:
Output 1: 'java' is not recognized as an internal or external command, operable program or batch file.
If you're receiving the above output, then you do not have Java installed on your computer. You will need to install Java.
How To Install Java Standard Edition (SE) Development Kit (JDK) In Windows 10 https://youtu.be/kFARYsqwlJI
Output 2:
Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.UnsupportedClassVersionError: net/minecraft/server/Main has been compiled by a more recent version of the Java Runtime (class file version 60.0), this version of the Java Runtime only recognizes class file versions up to 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source)
30989953 Bytes