2

I need to make a simple executable text file (preferably via chmod +x, but that isn't necessary) that runs a .jar file and passes in JVM arguments as well as jar-specific args. It must also run in terminal sp I can see the ouput.

#!/bin/bash
java -Xmx4G -Xms2G file.jar nogui

where nogui is the program-specific argument, doesn't seem to do anything when run in terminal (it doesn't even open a terminal window).

1

1 Answer 1

1

To run a JAR file via java you need the switch -jar.

#!/bin/bash
java -Xmx4G -Xms2G -jar file.jar nogui
1
  • wow, I can't believe I missed that. I knew I needed it, just one of those oops moments. thanks Oct 16, 2015 at 16:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .