Making a java .jar executable

This is just a brief tip on how to simply wrap a java .jar file into an executable. This approach does no error checking, and it is up to the user to ensure that you are passing the appropriate variable.

The simple solution is to make an executable with the full path to the .jar file and pass the arguments to it:

java -jar /full/path/to/file.jar $@

For example, for trimmomatic:

java -jar /usr/local/java/trimmomatic.jar $@

Then make that executable and make sure it is in your path.

chmod +x

Now you should just be able to call directly