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?
views:
45answers:
2
+1
A:
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" ?
Bozho
2009-12-07 10:19:13
+1
A:
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.
Brian Agnew
2009-12-07 10:26:26
Don't forget to wrap the path in quotes. There's a space in it.
BalusC
2009-12-07 12:12:39
Good point re. the spaces
Brian Agnew
2009-12-07 12:16:04