Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

Setting up a PATH system variable (MC server on windows)


  • Please log in to reply
5 replies to this topic

#1

ThaFunkS0ldier

Posted 23 April 2011 - 11:07 PM

Hey everyone,

I'm running a server on my computer (which has windows vista) and I went to re-download the .exe file so it would be the newer version, but then i noticed at the bottom it says: "First, make sure you can use java from the command line. On linux and mac, this should automatically work, but on windows you might want to set up a PATH system variable.
Then download minecraft_server.jar to anywhere, then launch it as:
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui"

How can i setup a PATH system variable?

-Thanks guys!  :SSSS:

Register or log in to remove.

#2

TheGuardian001

Posted 23 April 2011 - 11:12 PM

You most likely don't need to. Open up cmd, and type in "java -version" (without quotes.) If you get a printout of your java version, you don't need to do anything.
If you get an error along the lines of "Java is not recognized as a command, you'll need to set up your path. Otherwise you're fine.

#3

Dajabon
    Dajabon

    Zombie Killer

  • Members
  • 155 posts

Posted 23 April 2011 - 11:25 PM

All you have to do is open notepad, paste java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui into it and save as a launch.bat

#4

ThaFunkS0ldier

Posted 24 April 2011 - 12:29 AM

I typed java -version and it did what you said, so then i copy and pasted java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui into a notepad folder and saved it as launch.bat, but when I try to open the other icon that appears, it opens and closes really fast. Is this supposed to happen ?

#5

Conkbabes

Posted 30 April 2011 - 01:18 PM

if you put in a pause you can see the error message.
So after the line of code type "pause" without " marks and when you run it the window will stay until you click it off.

#6

Enosh74
    Enosh74

    Newly Spawned

  • Members
  • 1 posts

Posted 22 August 2011 - 08:02 PM

View PostTheGuardian001, on 23 April 2011 - 11:12 PM, said:

You most likely don't need to. Open up cmd, and type in "java -version" (without quotes.) If you get a printout of your java version, you don't need to do anything.
If you get an error along the lines of "Java is not recognized as a command, you'll need to set up your path. Otherwise you're fine.
I'm having a related issue. I can't launch java from the cmd prompt. I figured out how to set the PATH system variable, I just have no clue what to set it to.