I would expect the command is really
java /application/amazing.jar as
jar is the command to maintain jar files not execute them. If you really use
jar to run the file, use the second option and replace
java with `jar.
Just run the command
chmod +x /application/amazing.jar once. This will make the jar executable. After that you should be able to run the jar using the command
/application is included in your path.
An alternative approach is to write a short script to run your jar. For example
/usr/local/bin/amazing which would be run using the command
amazing could contain:
The first approach is simpler, but can not do any setup required before running the jar. The second approach can handle setup required before the jar is run. Just add the setup before the jar command. They can be combined and the
java command could be removed from the script.