By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,286 Members | 1,290 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,286 IT Pros & Developers. It's quick & easy.

Connection from Java appliaction to DB2

P: 3
Hi All,

I am trying to connect to DB2 database from an java application, but my connection fails. I tries with two types of drivers
type2 driver com.ibm.db2.jdbc.app.db2driver
and type4 driver com.ibm.db2.jcc.db2driver

My connection string is of the form
jdbc:db2:/server:port/db alais-name

For this type of remote connection to db2 server from an db2 client i think we need to use Type4 java driver.

I have copied the db2jcc.jar file from my ins directory.
While trying to open that file

I am getting an error as
Java Virtual Machine Launcher error
Failed to load main class manifest attribute from
(Location of the file)

Kindly please the exact solution by which i can connect to my DB2 database from my java client application(swing based)

Also tell me whether i need to start any files before running my application.

thanks
Mar 14 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.