I am trying to create my first jar file using:
jar cfvm myjar.jar manifest.txt Main.java
then run it using:
java -jar myjar.jar
which gives me the error msg:
Error: Could not find or load main class Main
Here are the contents of my manifest and source file
manifest.txt
:
Main-Class: Main
Main.java
:
public class Main {
public static void main(String[] args) {
System.out.println("hello world");
System.console().readLine();
}
}