How to execute java .jar file from command line?

Step 1: First go
windows start button and click and type cmd in search box.

Step 2: then select cmd.exe from list and open it.
 
 
Step 3: Use following command to navigate to location where you have .jar placed.
             cd
<folder path> then press
enter.
  

Then you have to type following command:
Java –jar GenerateInsertQueries.jar then press enter. Jar will be executed. If there is any error will be able to see on command prompt.


 

Leave a Comment