I'm trying to create a server for the first time. I downloaded the .jar file from the site and made a notepad file that reads, "java -Xmx1024M -Xms1024M -jar minecraft_server.1.12.2.jar nogui" and saved it as a .bat file. The command is not incorrect because I copied and pasted it straight from the official site. I set eula=true and clicked on the bat file, but when I do so, it opens and instantly closes. I put "pause" at the end of the command to see what the problem was. It reads, "
D:\Program Files (x86)\Minecraft Server 1.12.2>java -Xmx1024M -Xms1024M -jar minecraft_server.1.12.2.jar nogui
'java' is not recognized as an internal or external command,
operable program or batch file.
D:\Program Files (x86)\Minecraft Server 1.12.2>pause
Press any key to continue . . .
". Does anyone know how to fix this? I've done so much research and I only found one solution which involved going into advanced system settings > Environment Variables > system variables > New and then I basically had to make a new PATH that led to my Java file. Long story short, this didn't work for me even though it seemed to work for some other people. I'm Using the latest version of Windows 10 (as of june 27 2018). I will worship anyone with a solution
I did that and it gave me the same error as my .bat file did. But I am 100% sure that I have Java and the latest version of it installed. If I go to my windows bar and type "configure Java" and then click on "update" and "update now" it pops up a window that says "you already have the latest java Platform on this system."