Link to home
Start Free TrialLog in
Avatar of jayz_smith
jayz_smith

asked on

Exception in thread "main" java.lang.NoClassDefFoundError: SOAPClient4XG

Hi all,

When I am compiling soapclient, it's getting compiled properly. my soapclient4xg is in c:\example.  
my path variable is also set to  c:\j2sdk142_17\bin  

from cmd prompt, I run  " c:\example>javac SOAPClient4XG.java

but when I do c:\example\>java SOAPClient4XG  "host url"  "input xml"     the following error appears

"Exception in thread "main" java.lang.NoClassDefFoundError: SOAPClient4XG"

any idea why ?  ( I also tried with jdk1.5 ) but the same error remains

thanks in advance
Avatar of piotr_bochynski
piotr_bochynski

You need do add all required libraries to class path. Probably you have some classes in import section that tou must add to class path.
Class path can be defined in enviroment variable CLASSPATH or by -cp option of javac.

Read the following article:
http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html

Avatar of jayz_smith

ASKER

@ piotr :

classpath ? it is only to include 3rd party jar files .. and even though my java code is getting compiled. only problem is it's not getting run
ASKER CERTIFIED SOLUTION
Avatar of piotr_bochynski
piotr_bochynski

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
good