JVM Error: Could not find the main class. Program will exit
Hello!
I downloaded a small Java source project. I used Eclipse SDK 3.2.2 to build it, and exported it as a .JAR file. when I used the command:
javaw xxx.jar to run it, the Java Virtual Machine throwed me the following error message:
Could not find the main class. Program will exit.
When Eclipse asked me what was the project's main class,
Select the class of the application entry point:
, I selected the class that contained
publicstaticvoid main(String[] args){ ...}
, but still, the JVM told me that the main class was not found.
Could anybody tell me wheather I did something wrong ?
Thanks!
[829 byte] By [
Tata_Calua] at [2007-11-27 7:47:08]

I don't know about what Eclipse is doing there, but in order to have a "runnable" JAR file, it needs to have a proper MANIFEST file:
http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html#JAR%20Manifest
Apparently the "Main-Class" attribute is missing in the MANIFEST file generated by Eclipse. You'll have to find out why / how to fix that, or generate the JAR yourself (using ANT or something similar, for example).
The manifest file is missing from the project.
I searched the net and read about the manifest file and I saw that it is supposed to be located in META-INF/MANIFEST.MF. I suppose that means project_root/META-INF/MANIFEST.MF, right ?
I am asking this because I haven't got that much experience in Java and this is the first time I hear about a manifest file.
Does anyone have any Ideea how I add a manifest file to a project with Eclipse SDK? I searched the menus and I didn't find anithing of such sort... o
Does Eclipse have support for editing manifest files at all?