Java eclipse : Importing jar file in eclipse plugin project

949 views Asked by At

I made plugin project named DB2. Its purpose is to connect to database and update its values every time I save workitem When I try to import db2jcc.jar file from my desktop it gives me error!

Following is screen shot of error i encountered while importing:

enter image description here

1

There are 1 answers

3
Mirko Cianfarani On

Because miss the library jar in project.

Then press right click on name project inside Window Package Explorer and you can do one about two step:

  1. So you have to go in Properties of you project and go to Java Build PAth
  2. Or Build Path->configure Build Path (right click on name project inside window Package Explorer).

So you have this window: enter image description here

Press Add External JAR , go to path of you file .jar, check the file db2jcc.jar, press Finish and now you will have the library in you project.

OR

Add the dependencie of db2jcc in the pom.xml if you build a Maven Project.

<dependency>
    <groupId>cn.guoyukun.jdbc</groupId>
    <artifactId>db2jcc</artifactId>
    <version>1.4.2</version>
</dependency>

LINK