Follow by Email

Saturday, August 15, 2015

Executing JAR file using Batch Command(.bat)

Below is the script to run a JAR file using a .bat command, copy and paste it into the notepad and then save as batch_file_name.bat

@echo OFF
cd C:\upload
java -jar compareRun.jar

line 2 is the folder path for jar file, please change as per your requirements.
line 3 is the actual execution of the jar file
line 4 would avoid closing of console, so you can view the output.