how to run a jar file in terminal code example
Example 1: how to execute a bash script in terminal
$ chmod +x fileName
$ ./fileName
Example 2: how to run a java file in terminal
javac FirstJavaProgram.java
$ chmod +x fileName
$ ./fileName
javac FirstJavaProgram.java