Connection from Java appliaction to DB2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • techiesekar07
    New Member
    • Mar 2007
    • 3

    #1

    Connection from Java appliaction to DB2

    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.jdb c.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(swi ng based)

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

    thanks
Working...