Sunday, September 6, 2015

command line - Opening a Batch file from another (Including Java)


I am writing a batch file that runs other batch files (and some other things) for easier methods of running my Minecraft Bungeecord server.


This is the batch file, Run.bat, I am running from the server managing batch file:


@echo off
java -Xms512M -Xmx512M -jar BungeeCord.jar
pause

And this is the section in the server managing batch where I run the file:


:start
SET PATH=C:\Users\micah_000\Desktop\Server Files
cd %PATH%\Bungeecord
start Run.bat

When I run the Run.bat from the server managing batch this is what the cmd shows:


'java' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue . . .

When I run the Run.bat just by double clicking it, it works just fine.


Anyone have the same issue, or know how to fix it?


Answer




SET PATH=C:\Users\micah_000\Desktop\Server Files
cd %PATH%\Bungeecord



may be breaking your code.
Could you please delete that, and instead just type this?



CD "C:\Users\micah_000\Desktop\Server Files\Bungeecord"



No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...