Skip to content
Advertisement

Connect DB2 with Java

How can I connect DB2 with Java in Eclipse? What are some step-by-step instructions?

How can I add the classpath in Eclipse?

Code snippet:

JavaScript

On running the code, I got the following exceptions:

JavaScript

Advertisement

Answer

You need to correct the package name.

JavaScript

To add .jar in your project, use menu ProjectPropertiesJava Build Path → tab Select “Libraries”Add External Jars…

Advertisement