Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

4409723

Suspended
Original poster
Jun 22, 2001
2,221
0
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?!
 
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.
 
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
 
Still not working, you can see most of the settings on screen there. thanks so far!
 

Attachments

  • ee.jpg
    ee.jpg
    81.8 KB · Views: 65
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.