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 Answers1

1

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

#!/bin/bash
java -Xmx4G -Xms2G -jar file.jar nogui
cl-netbox
  • 31,163
  • 7
  • 94
  • 131
A.B.
  • 90,397