Thomas-

The executing jar's manifest must identify a class which contains a main method
in order to execute at command line
java -jar JarWithoutMain.jar //This will fail because there is no main method included
java -jar Main.jar //The jar's manifest identifies a main method

Make sense??
-Martin
----- Original Message -----
Sent: Tuesday, January 28, 2003 11:06 AM
Subject: Axis

Hi,
 
I have the following problem:
 
If I instantiate the Object out of the class "org.apache.axis.client.Service;" I get a NoClassDefFoundError at runtime.
This error occurs only if I using this in the following manner:
 
package de.stuff;
 
import org.apache.axis.client.Service;
 
class Remote {
..
public Remote() {
    Service service = new Service();
}
..
}
 
All Classes are compiled with:
 
javac  -sourcepath src\ -d build\ src\de\stuff\Main.java
jar cvfm im.jar src\Manifest.mf -C build\ .
 
If I start the application with "java -jar im.jar" I get the NoClassDefFoundError.
 
Now, I've changed the Remote-Class to:
 
class Remote {
..
public static void main {
    Service service = new Service();
}
..
}
 
and compiled this class only:
 
javac Remote.java
 
Now it works fine (java Remote)! The Service-Object instantiated correctly.
Can someone tell me why it does't operates if this class compiled together with other classes in a package ?
 
Thomas

Reply via email to