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"
Honestly, I have no idea. I'm going to the start menu, typing in "Command Prompt" then hitting enter. I just copy the run command directly from the wiki and change it to match the .jar file name.
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
cd <filepath>
I have a backup of my network saved in my documents folder so as an example I would run:
cd C:\Users\adams\Documents\MCSERVBACKUP
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.
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.
Any help would be greatly appreciated.
Put pause at the end of your startup script and post the error log.
There is no startup script or error log, it just doesn't open.
Every server tutorial makes you create a startup script.
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"
And is your .jar called exactly like that?
Yes
Are you running the java command in the same directory as the jar file is located.
For example if you stored it in your desktop are you changing the command prompt directory to that location and then running the command?
Hello, I am pure.
I am passionate in the development and management of servers. This includes hosting, configuring and managing them.
Honestly, I have no idea. I'm going to the start menu, typing in "Command Prompt" then hitting enter. I just copy the run command directly from the wiki and change it to match the .jar file name.
I suggest you follow the wikis guide and create a .bat file.
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.
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.
Java Oracle, Version 8 Update 241 is the most recent, right?
Yes that's latest. Which issue was not resolved?
It doesn't say, it just won't run Java files.
Post results after executing the following command in a command prompt: java -version
"java version "1.8.0_241"
Java(TM) SE Runtime Environment (build 1.8.0_241-b07)
Java HotSpot(TM) Client VM (build 25.241-b07, mixed mode)"
You installed 32-bit Java. Uninstall it and grab the 64-bit version one.
I went back to the Java website and downloaded the Offline-64 bit Java and I'm still having the same issue.