I've been trying to set up a server for me and my friends to play on but while setting up I told the server .jar file to open with notepad. When I went back to try and open it with Java it would load up the window for the server for just a split second then close out immediately again. I've tried uninstalling the server several times and every time I reinstall the server it installs very quickly as if I already had the files on my PC. I've tried restarting my PC several times and I'm using windows 10.
Most of the ones I see tell me to just double click on the jar file and it runs. I looked at the wiki and it told me to put "java -jar <server_name>" into the command prompt. I did that (substituting "<server_name> for the file name) and it told me "Error: Unable to access jarfile minecraft_server.1.15.2.jar"
The command will only work if you are in the same directory as the jar file is located. After opening the command prompt you must change it to the location of the file first. This can be done using the command
I have a backup of my network saved in my documents folder so as an example I would run:
and then run the java command.
As Tails has pointed out, it is always best practice to have a .bat file as in the event of a server crash you can automatically start the server back up by adding the script to your server configuration. It is also just easier in general.
Rollback Post to RevisionRollBack
Hello, I am pure.
I am passionate in the development and management of servers. This includes hosting, configuring and managing them.
I think I know what the problem is. I was trying to install tModLoader so I could play Terraria mods and when I tried to install the files with the Java installer, it did the same thing that the server was doing so I think it's a problem with my Java. Is there some way I could fix it because I tried uninstalling and reinstalling Java.
do you have the most recent version of Java? I'm not sure if this is still a present issue, considering I last checked back in the times of java 1.7, but java tends to get unstable really quickly if you don't have the most recent version. Make sure you're using the correct installer aswell.