.Jars and Manifests

Discussion in 'Mac Apps and Mac App Store' started by 4409723, Jun 7, 2004.

  1. 4409723 Suspended

    4409723

    Joined:
    Jun 22, 2001
    #1
    I'm testing a small java programa and I want to check compatability before I go further. I have two files in a package called EE. One is Viewer.java and the other is FileDisplay.java

    I'm using Eclipse and have made a folder called META-INF with a text file inside with MANIFEST.MF with the contents
    Code:
    Manifest-Version: 1.2
    Main-Class: Viewer
    Specification-Title: "Extended Essay" 
    Created-By: 1.4 (Sun Microsystems Inc.)
    
    When I try to run this program I get an error and in console it says:
    Exception in thread "main" java.lang.NoClassDefFoundError: Viewer

    I read the package could be messing this up, help?!
     
  2. jeremy.king macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #2
    Does the Viewer.java class have a method with the following signature?

    public static void main(String[] args);

    To execute, there must be a static main method.
     
  3. 4409723 thread starter Suspended

    4409723

    Joined:
    Jun 22, 2001
    #3
  4. FritzTheWonderM macrumors member

    Joined:
    Dec 12, 2003
    Location:
    Planet 10
    #4
    you need to specify the fully qualified name of the class. You said the package name was EE (should be lower case by the way) so you should have:

    Main-Class: EE.Viewer
     
  5. 4409723 thread starter Suspended

    4409723

    Joined:
    Jun 22, 2001
    #5
    Still not working, you can see most of the settings on screen there. thanks so far!
     

    Attached Files:

    • ee.jpg
      ee.jpg
      File size:
      81.8 KB
      Views:
      32

Share This Page