Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Error while running the SAP JCO java program running via command line

Former Member
0 Kudos

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.

5 REPLIES 5

martin_voros
Active Contributor
0 Kudos

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.

0 Kudos

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

0 Kudos

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

0 Kudos

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

0 Kudos

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.