User:ExtremeHeat11/sandbox/Setting up a server/Windows instructions

Verify and install the latest version of Java

 * 1) Make sure that you have Java 7 installed. To do this, we first need to open up a command (CMD) window.
 * 2) In Windows XP/Vista/7, whilst holding the Windows key down, press R to open the Run dialog. Type   and press enter.
 * 3) * Once the command prompt has opened, enter the following command, followed by the enter key:


 * 1) * Java should display its version, which should read "Java version 1.7"
 * 2) If you get the error " ", then you may have a previous version (less than 1.6) of Java or Java may not be in your system path.
 * 3) *For 32-bit users you can obtain the latest version here: Java download page. If you use a 64-bit OS, ensure that you download the x64 Windows package.
 * 4) * After you have installed the latest version of Java try again with.
 * If you get an error at this point, try the following to add Java to your system path.
 * 1) *# Right click Computer.
 * 2) *# Click properties.
 * 3) *# Click "Advanced system settings".
 * 4) *# Click "Environment Variables".
 * 5) *# Under system variables, find the Path variable.
 * 6) *# Click edit, and append to the end of the value: . If you use 32-bit Java on a 64-bit OS use:
 * 7) *# Restart your computer.
 * 8) *# Now re-open the command prompt and try again.

Windows Vista/7 users: If these steps don't work for you, open the Control Panel and search for, then click Java (32 or 64-bit). Under the Java tab, click "View...". The installed version of Java will be listed under 'Platform'.

Start the Minecraft server (.exe version)

 * 1) Double click on the "Minecraft_Server.exe" file you downloaded and the server should start with a default configuration.
 * 2) Upon its initial start, it may throw some "file not found" error messages. This is normal. The files are being created.
 * 3) After the first start, you'll probably want to shut it down (enter  in the server command window) and then edit some configuration files—as is explained below.

If you get an error such as "Can't save server.properties" and your screen fills with useless, gibberish text, close the command prompt window and run the MinecraftServer.bat file as the Administrator by right-mouse clicking on it and choosing 'Run as...'. (You will need the administrator password to do this...)

Start the Minecraft server (.jar version)

 * 1) If you have the .jar version, you will need to have a path variable set up for Java in order to start the jar version of the server. Refer to step 3 of "REQUIRED: Verify and Install the Latest Version of Java" above to set up a path variable.
 * 2) To start the jar version of Minecraft on Windows, create a new file in Notepad, and paste in
 * (add in  if your server is on a 64-bit computer using 64-bit java)
 * 1) Save the file as startserver.bat, and place the file in the same folder as minecraft_server.jar. The .bat extension saves the file as a batch file.
 * 2) Double click startserver.bat, and the Minecraft server will run.

Starting the jar version without altering your system path
To start minecraft.jar server without having to change your system path variable you need to instead express the path variable for Java in the "start.bat" file. This is handy because it allows you to still run commands from command prompt using the default system path, without having to constantly edit the system path.
 * 1) To do this open your start.bat file (or whatever you've named it) with Notepad
 * 2) On the very first line add the command  so that a command window isn't opened to show the output from our start file
 * 3) On the next line, make sure the system can find Java (also called the Java Runtime Environment or JRE) by adding it to the Path Environment Variable. On a current Windows PC Java will be most commonly located at "C:\Program Files (x86)\Java\jre7\bin\java.exe", so what you would then write is  where   contains the existing Path values and   contains the location of your 32bit Program Files - usually "C:\Program Files (x86)" (adjust this if you are using Java 6)
 * 4) Finally, make sure on the last line you have the command that starts the Minecraft server itself:  (If you are using 1.6.1 or 1.6.2, change the part of minecraft_server.jar to what your .jar file is, such as minecraft_server.1.6.2.jar)
 * 5) If you prefer not to use the server's Graphical User Interface (GUI) to enter administration commands, simply add the option  to the end of the last command above, so that it reads:

Here is an example of a bat file that starts the minecraft server on Windows, in this example the minecraft directory is located at D:\minecraft (so minecraft_server.jar is located at D:\minecraft\minecraft_server.jar), the operating system is Windows 7 64 bit, Sun's java.exe is installed at C:\Program Files\Java\jre7\bin   This java happens to be 64 bit and the PC I'm running has plenty of RAM, 16 GB in my case, so I can allocate the 2GB via the   of maximum memory to run minecraft. The  line below tells the bat file to go the D: drive. Also note the double quotes around "Program Files" below, needed because of the space between the words  and. I also chose not to use the @echo off. The  in the 1st line is to just have the MS DOS window that is used to run minecraft display "run-minecraft" in the window title bar.

Increasing the amount of RAM allocated to the Minecraft server
If you would like to start your server with more RAM, you will need to create a Windows batch file and run your server that way. Don't worry, it's easier than it sounds.


 * 1) Open up Notepad (not Wordpad) to create a text document with no formatting (italics, boldface, etc.).
 * 2) Identify your Windows OS type (32-bit or 64-bit), which may be done through the Control Panel. Also, identify which version of Java you are running—32 bit or 64 bit.
 * 3) Based on your OS and Java types...
 * 4) If Windows is 32-bit or Windows is 64-bit with 64-bit Java, copy this into your document:
 * 5) If you are, for some reason, running 32-bit Java on a 64-bit system, upgrade Java. Also, if you have installed Java to a different directory or changed the name of your Minecraft server .exe file, see below.
 * 6) If you do have 32-bit Java on a 64-bit system, Java.com recognizes Java by browser, and some browsers are 32-bit, so downloading both 32-bit Java and 64-bit Java may be needed to run everything correctly
 * 7) *So what does all of this mean? The executable command is the file path to the location of your most current javaw.exe file. javaw.exe is identical to java.exe but there is no associated console window, Since we are starting our own from our .bat. If you installed Java to a different location, you will have to locate it and paste that file path in instead. The next part  is your RAM allocation, in megabytes (MB). By default, your server runs with about 100 MB of RAM, which is very little. Most people will change their server to run on  1 GB (1024 MB) of RAM; 2 GB of RAM is also common. As for the , this indicates that Minecraft_Server.exe is a Java archive.
 * 8) *Lastly in the executable command is the name of our .exe file . Typically, it is named Minecraft_Server.exe. Upper and lower case does matter. Rename  to whatever you named your file. Then click   and for the file name call it , and make sure you select   from the drop-down arrow (Note: If you do not see   as a file type, you must put   in quotes.  ). Then save it in the same location your server is saved, and double click your   file. If all goes well, you will notice that you will have much more RAM available on your server!
 * 1) *Lastly in the executable command is the name of our .exe file . Typically, it is named Minecraft_Server.exe. Upper and lower case does matter. Rename  to whatever you named your file. Then click   and for the file name call it , and make sure you select   from the drop-down arrow (Note: If you do not see   as a file type, you must put   in quotes.  ). Then save it in the same location your server is saved, and double click your   file. If all goes well, you will notice that you will have much more RAM available on your server!

If Windows does not recognize the filetype (You are being prompted to select a program to open it with), it may be because Minecraft_Server is missing the .exe extension. This can be fixed by renaming the Minecraft_Server file to Minecraft_Server.exe. If it worked, the icon should now be the Minecraft symbol.

If this does not work, you will have to go into a command window by opening Run, typing cmd and pressing enter. Once there you need to navigate to the folder you have created.

To do this:


 * 1) Ensure you are in the proper drive (usually C drive). Type  and then hit enter to access the c drive
 * 2) Now you need to call the directory (open the folder). Type  then hit enter.  Make sure to include the quotation
 * 3) Ensure you are in the proper directory. Type  and command will generate a list of contents of the folder, you should see minecraft_server there.
 * 4) Rename Minecraft. Type   then hit enter. This should add the .exe extension to the executable and it should now operate correctly.