DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Posts
    34

    Main Class not found problem

    I just made a jar file from an application/applet(it can be run either way) that I wrote. I followed all of the directions on the tutorial in cjards signature. The class that runs my program is called Runner, so in my manifest file I put Main-Class: Runner and then I pressed enter. I typed in jar cvfm SPX.jar mf.txt Saterasoft/ and it made the jar file. When I double click on the jar file, a pop up window informs me that the Main Class cannot be found. Does anyone know why this is happening?
    www.saterasoft.cjb.net

    Come and play the games.....

  2. #2
    Join Date
    Feb 2004
    Posts
    808
    read the tutorial more closely.. you called the JAR command from the wronf directory, and as a resukr your jar file is messed up inside

    i,e, there is a very big dufference between these :

    c:\java\FINAL\> jar cvfm ..\MYAPP.jar ..\mf.txt .
    c:\java\>jar cvfm MYAPP.jar mf.txt FINAL/
    The 6th edict:
    "A thing of reference thing can hold either a null thing or a thing to any thing whose thing is assignment compatible with the thing of the thing" - ArchAngel, www.dictionary.com et al.
    JAR tutorial GridBag tutorial Inherited Shapes Inheritance? String.split(); FTP?

  3. #3
    Join Date
    Feb 2004
    Posts
    34
    The problem I had with the tutorial is that when I tried to use the jar command in the Final\App folder , I got the error that jar was not a recognized command so I attempted to do it from the java folder and I keep getting that error.
    www.saterasoft.cjb.net

    Come and play the games.....

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


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


Sponsored Links