To run a java program from the command line you basically have to execute the compiled jar file. If you have compiled the .jar file then to run the .jar file containing your java program from the command line at the command prompt simply type
java -jar myjarfile.jar argument1 argument2
the arguments are optional.
That is all.
If you liked this article please do leave a reply and share it with friends.
Thanks.