Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Axis + jar file 1

Status
Not open for further replies.

EwS

Programmer
Joined
Dec 30, 2002
Messages
398
Location
US
I have myFile.java file, in which I do this:
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;

When I run myFile.java, it works just fine, but when I run myFile.jar, I'm getting NoClassDefFoundError: org/apache/axis/client/Service. If there's anything that I need to include in the manifest file when I create the jar file, why is it not complaining about client.Call, just client.Service then?

I would appreciate your help. Thank you.
 
Because Service is needed first. (like in real life :) ).
Do you have the Classpath set?

You may set the classpath from the manifest:
Code:
Class-Path: . a.jar c.jar
Note:
Separate multiple jars by blank.
Append an empty line.
Deviant spelling of Class-Path

seeking a job as java-programmer in Berlin:
 
Thank you, I'll try that.

One more question: how do I define multiple classes in the manifest file? Is "Main-Class:" only good for one class or can I enter multiple classes and separate them by a space?
Thanks.
 
The Main-Class is used to start a class, containing a main-method, when nothing else was specified.
If you have multiple main-classes in your package, you need different startscripts.
Of course you could use nearly the same jar, only differntiated though a different 'Main-Class' in the manifest file, but this wouldn't be elegant.

Or you start a selection-class, like OpenOffice, which asks, what the user likes to do (wordprocessing, calculation, presentation, printer-setup).


seeking a job as java-programmer in Berlin:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top