chenwei
asked on
How to call a class in the jar?
I try deploying the wsdd by following command and go to the dir where axis.jar locates which contains AdminClient.java:
java org.apache.axis.client.Adm inClient deploy.wsdd
But I got exception as follow:
C:\Projekte\MVNREPO\repo\a xis-1_4\ax is\1.4>jav a org.apache.axis.client.Adm inClient deploy.wsdd
Exception in thread "main" java.lang.NoClassDefFoundE rror: org/apache/axis/client/Adm inClient
My questions:
1. How can I call it correctly?
2. If I don't goto the dir where axis.jar locates but goto the dir where deploy.wsdd locates, how can I call it?
java org.apache.axis.client.Adm
But I got exception as follow:
C:\Projekte\MVNREPO\repo\a
Exception in thread "main" java.lang.NoClassDefFoundE
My questions:
1. How can I call it correctly?
2. If I don't goto the dir where axis.jar locates but goto the dir where deploy.wsdd locates, how can I call it?
You need th full path to the jar in the classpath
(fROM THERE)
java -cp axis.jar org.apache.axis.client.Adm inClient deploy.wsdd
java -cp axis.jar org.apache.axis.client.Adm
ASKER
I understand what you mean. I did following:
1.
create AXISCLASSPATH which contains all the fullpath of the jars.
2.
Then I create CLASSPATH which has the value of %AXISCLASSPATH%.
Isn't it ok?
1.
create AXISCLASSPATH which contains all the fullpath of the jars.
2.
Then I create CLASSPATH which has the value of %AXISCLASSPATH%.
Isn't it ok?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
what I did is ok.
Eventhoug, thanks.
Eventhoug, thanks.
:-)