Basically, before running the file first, make sure that your main class is available or not in the manifest.mf file. Then, you can use the below command:
java -jar filename.jar
I hope this will help.
Want to become a Java Expert? Join Java Training now!!
Want to know more about Java? Watch this video on Java Tutorial for Beginners | Java Tutorial: