I'm trying to create a simple jar program name Example.java which displaying "Hello World" to the user and the code are as follow:
public class Example{
public static void main(String[] args) {
System.out.println("Hello World");
}
}
and I have my manifest file as below:
Manifest-Version:1.0
Main-Class:C:\training\Java\JAR\s3\Example
when I run this command:
java -jar HelloWorld.jar
it returns
no main manifest attribute, in HelloWorld.jar
what is the problem here and why I cannot run the JAR file? I already look for some example but those were different from mine. Anyone care to help? Thanks!