how to create jar file of java project using command prompt code example
Example 1: how to run java program with external jar files in command prompt
javac -cp "<File-Path>.jar;." <filename>.java
java -cp "<File-Path>.jar;." <filename>
Example 2: compile java to jar in mac
javac HelloWorld.java