0

I have a .jar file which I want to run from an Excel sheet using VBA. Ideally, this could be done on both Windows and Mac with only one set of code.

To run the .jar file, I call it from the command line/terminal with java -cp somejar.jar outputResults/something. Then, I enter a String through the command line to specify the starting user in my simulation. Finally, I enter either 0 or 1 to specify the type of function used. After this a results file is generated.

It seems this may be possible with Shell, but the linked example only provides an example for a single line entered, not multiple. Is this feasible and, if so, can someone point me towards an example?

taurus
  • 470
  • 7
  • 22

1 Answers1

0

is this what you are looking for :

#!/bin/bash
"$JAVA_HOME"/bin/java -jar /root/jeevee/bin/deploy.jar
yoga
  • 710
  • 5
  • 11