Java eclipse : Importing jar file in eclipse plugin project

别来无恙 提交于 2019-12-22 13:12:10

问题


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:


回答1:


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:

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



来源:https://stackoverflow.com/questions/30911465/java-eclipse-importing-jar-file-in-eclipse-plugin-project

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!