Link to home
Start Free TrialLog in
Avatar of chenwei
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.AdminClient deploy.wsdd

But I got exception as follow:

C:\Projekte\MVNREPO\repo\axis-1_4\axis\1.4>java org.apache.axis.client.AdminClient deploy.wsdd
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/axis/client/AdminClient

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?
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

You need th full path to the jar in the classpath
(fROM THERE)

java -cp axis.jar org.apache.axis.client.AdminClient deploy.wsdd
Avatar of chenwei
chenwei

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?
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chenwei

ASKER

what I did is ok.

Eventhoug, thanks.
:-)