Opening newly created jar file - "Failed to load Main-Class manifest attribute"
I'm trying to make a jar file but it never seems to work.
I have three class files, one with the main method, in the folder "hexMaze." In command prompt, I go to this directory, then type in "jar cvf HexMaze.jar *":
This makes the file HexMaze appear in my hexMaze folder. However, when I double-click it I get this error message:
C:\Documents and Settings\Aaron MacDonald\Desktop\hexMaze>jar cvf HexMaze.jar *
adding: HexArray.class(in = 3460) (out= 2057)(deflated 40%)
adding: HexCell.class(in = 2780) (out= 1390)(deflated 50%)
adding: HexDisplay.class(in = 1538) (out= 940)(deflated 38%)
C:\Documents and Settings\Aaron MacDonald\Desktop\hexMaze>
I also get this error message when I try to make my jar inside Eclipse. Can anyone tell me what's going on?
Failed to load Main-Class manifest attribute from C:\Documents and Settings\Aaron MacDonald\Desktop\hexMaze\HexMaze.jar
If it helps, I'm using jdk 1.5.03 on Windows XP. I believe my PATH variable is right, since I'm able to compile through the command promt (though when I try to run a file in the promt I get a bunch of NoClassDefFoundErrors...).
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL