Java: JVM Error: Could not find the main class. Program will exit

tatacalutatacalu New
edited July 2007 in Internet & Media
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
public static void 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!

Comments

  • tatacalutatacalu New
    edited June 2007
    dudes.. no one ???
  • shwaipshwaip bluffin' with my muffin Icrontian
    edited June 2007
    open up the rar file with a compression program that supports .rar. (winrar, for example). Find the manifest file, and make sure that the mainclass attribute is set properly.
  • edited June 2007
    sounds like a common classpath error. make sure the current working directory is set in your classpath.
  • edited July 2007
    make sure you named the file the same name in the public class
Sign In or Register to comment.