I know this is a very common question, but I tried googling and got no helpful result. I\'m trying to make a jar out of my \"Main.class\" file (made in NetBeans, but I\'m not tr
You need to specify the Main-Class property in the manifest file: Understanding the Manifest. This usually means you need to add the manifest file yourself instead of letting it be added automatically.
By the way you can always run your code without a manifest like this:
java -cp path/to/myJar.jar my.package.MyClass
The manifest is required when you want to run it like this:
java -jar path/to/myJar.jar