xxxxxxxxxx
cd C:\my_project // go to project directory
javac MyClass.java // compile the project
Main-Class: com.example.MyClass // put this line inside Manifest.txt
jar cvmf Manifest.txt MyJarFile.jar MyClass.class // include manifest file in jar
jar tf MyJarFile.jar // verify the jar file
Alternative way:
cd C:\my_project
jar cf myApp.jar *.class resource.txt // JAR file will be created in the same directory where files and resources are