Bhuvana Nagulan
Bhuvana Nagulan

Reputation: 129

jdbc connectivity error

while establishing database connectivity with java application,i tried to run .jar file it showing an error msg "Failed to load main class manifest attribute from c:\program files\sqljdbc_2.0.1803.100_enu\sqljdbc_2.0\enu\sqljdbc4.jar " how i can proceed further?

Upvotes: 1

Views: 403

Answers (2)

Brian Agnew
Brian Agnew

Reputation: 272277

Don't run the .jar file. It's a library. Instead you need to reference it whilst running your class file e.g.

java -cp c:\program files\..\sqljdbc_2.0\enu\sqljdbc4.jar {yourclassfile}

You can run a .jar file if it's configured as such. However a JDBC .jar won't have the appropriate configuration and you should think of it as similar to a (say) .DLL.

Upvotes: 1

Bozho
Bozho

Reputation: 597076

First pick one from here

The .jar file with the driver is not supposed to be run - it is supposed to provide low-level implementation of the communication between your java application and the database in question.

Anyway, what are you doing "while establishing db connectivity" ?

Upvotes: 1

Related Questions