This is a video tutorial on how to create an Executable JAR file for a simple Java program on Windows.
Steps to Follow:
1.Compile your java code, generating all of the program's class files.
2.Create a Manifest file containing the following line:
Main-Class: name_of_class_containing_main
3.To create the JAR, type the following command :
jar cfm jar_file manifest_file input_files
4.To view the contents of the JAR, type :
jar tf jar_file
5.Execute the application or JAR file from the command line by typing :
java -jar jar_file