-3

I tried to put two jar commands in a batch file, but it just won't work.

At first I tried this:

@echo off 
"C:\Program Files (x86)\Java\jre7\bin\javaw.exe" -jar Soulsplit.jar
"C:\Program Files (x86)\Java\jre7\bin\javaw.exe" -jar Soulsplit.jar

I've also tried:

@echo off
"C:\Program Files (x86)\Java\jre7\bin\javaw.exe" -jar Soulsplit.jar & "C:\Program Files (x86)\Java\jre7\bin\javaw.exe" -jar Soulsplit.jar

if I run those batch files, they will just do one line, I hope someone could help! It will only run the first command, I expect it to start up two programs.

Just putting one line of command:

@echo off
"C:\Program Files (x86)\Java\jre7\bin\javaw.exe" -jar Soulsplit.jar

does work.

DwarfExop
  • 33
  • 5
  • 5
    In what way does it "not work"? What do you expect to happen, and what actually happens? – DNA May 03 '14 at 20:48
  • It will only run the first command, I expect it to start up two programs. – DwarfExop May 04 '14 at 14:54
  • Is your program command-line based (do the read from `System.in` and/or print to `System.out`), or are they GUI based, or Windows services? – Honza Zidek May 04 '14 at 15:40

1 Answers1

2

If you expect the output from your Soulsplit.jar to the command line, run java.exe instead of javaw.exe - see Difference between java.exe and javaw.exe.

Community
  • 1
  • 1
Honza Zidek
  • 9,204
  • 4
  • 72
  • 118