Reputation: 153
I am trying to create a *.bat file which runs a jar file and shows the console using 'cmd.exe'. But I want it in matrix like theme i.e. Black Background with green text. But I am unable to create this. I tried few options most does not work, those which works starts cmd prompt in a infinite loop keep on creating cmd windows.
This is the initial file.bat which works fine with default colors.
start java -jar MainMenu.jar
exit
This is one which changes the colors but keep on creating cmd windows
start /B cmd /k "COLOR 0A&&java -jar MainMenu.jar"
exit
How to achieve this?
Upvotes: 3
Views: 981
Reputation: 4278
Worked on my machine, i just had to add a pause
to see the effects:
color 0a
java -jar launcher.jar
pause
Upvotes: 1