• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to include db2jcc.jar and db2jcc_license_cu.jar (db2 driver) into my project  RSS feed

 
mohamed sheta
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to connect db2 with java or jsf . i get the driver from \DB2 installation\java and i dont know how can i include it
 
Cesar Loachamin
Ranch Hand
Posts: 90
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mohamed.

If you want to use JSF, you must put your drives in the lib folder of your web project. WEB-INF/lib/db2jcc.jar and WEB-INF/lib/b2jcc_license_cu.jar.
And if you want to use these drivers in a java program you need to set the classpath to the forlder of your jars.

Regards

Cesar
 
mohamed sheta
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cesar Loachamin wrote:Hi Mohamed.

If you want to use JSF, you must put your drives in the lib folder of your web project. WEB-INF/lib/db2jcc.jar and WEB-INF/lib/b2jcc_license_cu.jar.
And if you want to use these drivers in a java program you need to set the classpath to the forlder of your jars.

Regards

Cesar


Thankssssssss Cesarr
 
Tim Holloway
Bartender
Posts: 18720
72
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, in almost all cases, you should NEVER put the jdbc drivers ANYWHERE in your WAR. Doing so limits flexibility and may add licensing restrictions to redistribution of the WAR.

Normally you install the JDBC drivers into the appserver's library directory instead of the webapp. For example, in Tomcat 6, that would be TOMCAT_HOME/lib.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!