javac create jar command line code example
Example 1: run jar file command line
java -jar <jar-file-name>.jar
Example 2: compile jar file command
jar cvf example.jar *
Example 3: java to jar
# cd into the directory that contains your project
jar cvfe <output jar filename>.jar <main class location> *
Example 4: how to run module jar file in java
javac -d out --module-source-path src/main/java --module com.jenkov.mymodule