2012 Jan 10 1:17 AM
Hi,
We are facing an issue while using SAP JCO. When i try to run the sample program using RAD 8.0 ( IBM IDE tool For Java Development) its working fine.
The same sample program if i try to run using command line, Then its giving below exception message.
Exception in thread "main" java.lang.NoClassDefFoundError: Integration
NOTE: I have configured proper sapjco jar & Dll files path in class path settings in my batch file.
2012 Jan 10 2:05 AM
Hi,
class loader can't find class definition during runtime but it could find it during compilation. So the problem is with your classpath. Does your classpath point to file with class Integration? Check this [blog|http://javarevisited.blogspot.com.au/2011/06/noclassdeffounderror-exception-in.html].
Cheers
Added reference to blog.
2012 Jan 10 3:33 AM
Hi Martin,
Thanks for your reply. I was already aware that it was due to classpath issue. The exact problem is, I could not able to locate the class Integration.
Also, I use the same classpath setting for both compilation & running the program.
NOTE: The blog location you mentioned in your reply is not working.
Thanks
Bala
2012 Jan 10 3:54 AM
Hi,
I am not sure how I could help you. That blog also mentions how to check what classpath is actually used in program by writing out classpath at the beginning of program. I would double check if classpath is really same.
Cheers
2012 Jan 10 9:27 PM
Hi,
The issue is related to class path only,have you mentioned the path of your proper jar files in the classpath as well as path, please do it in both.
after then check, I will also suggest you to go into jar directory and then try to execute it, so that you can come to know the issue.
Regards,
Amit Barnawal
2012 Jan 11 1:45 AM
Hi Amit,
Thanks for your message. I copied the jar & dll files in the same folder as suggested by SAP JCO documentation. Also, the location of jar & dll has been updated into Path as well as classpath variables. The compilation is successful after i configured the path. Now, the issue is only while running the program.