There's already a Manifest-File:
 
Manifest-Version: 1.0
MainClass: example.example.Main
Created by: Thomas Schröter, [EMAIL PROTECTED]
 
The application already works. But if the Remote-Class instantiated I get
a NoClassDefFoundError org.apache.axis.client.Service; at runtime.
 
But If I compiled the Remote-Class standalone and add the main-function to it:
 
class Remote {
..
public static void main {
    Service service = new Service();
}
..
}
 
it works fine. The org.apache.axis.client.Service class instantiated correctly.
I don't understand it!
----- Original Message -----
From: Martin
Sent: Sunday, July 28, 2002 1:19 PM
Subject: Re: Axis

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