Hi all,
I am getting the following error when I am trying
to run my application:
Exception in thread "main"
java.lang.NoClassDefFoundError: org/apache/axis/client/Service
But I put all the jars in the <axis home>/lib
directory on the classpath.
The example in <axis
home>/samples/userguilde/example1 works fine if I uncomment the
package-comment
and compile the TestClient.java only and run this
application with:
java TestClient
But my application, which is located in a jar file
doesn't find the Service-Class. If
I start the application using the following
command:
java -jar application.jar
I am getting an Exception:
NoClassDefFoundError-Exception.
For a test I've created two classes: Main.java:
package test.app;
import test.app.Remote;
public class Main {
public static void main(String [] args) { Remote remote = new Remote(); } } Remote.java:
package test.app;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service; class Remote {
public Remote() { Service service = new Service(); } } and a Manifest.mf-File:
Now, I've compiled this with:
javac -sourcepath src\ -d build\ src\test\app\Main.java
jar cvfm test.jar src\Manifest.mf -C build\ .
If I start the application with:
java -jar test.jar I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/axis/client/Service
Can anyone help me in this case ?
Regards,
Thomas Schröter |