Forums Register Login

Not able run mysql based jdbc program

+Pie Number of slices to send: Send
I have mysql-connector-java-5.1.0-bin.jar should I put in classpath of windows environment variable. In web application I read we can keep in lib directory.
or

there is any other way.
1
+Pie Number of slices to send: Send
WEB-INF/lib is the recommended way.
+Pie Number of slices to send: Send
There are also other ways, but it depends on what servlet container you're running your application in. For example in Apache Tomcat you could also put your libraries in a special lib folder somewhere under the Tomcat installation directory, so that these libraries would be seen by all web applications. (I don't know if this is still possible with Tomcat 7.0, see the Tomcat documentation).
+Pie Number of slices to send: Send
I think this discussion would sit better on our JDBC forum: moving.
+Pie Number of slices to send: Send
What if my application is not web application then where should I keep/set this .jar file to run my program/application?
+Pie Number of slices to send: Send
Anywhere on your machine. Where do you keep the rest of the application?
+Pie Number of slices to send: Send
I think the best place is inside your software and add it to the software class path.

There you will have the control over it more cleary.
The overall mission is to change the world. When you've done that, then you can read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1598 times.
Similar Threads
Passing List from Servlet to jsp ? - value of list becomes NULL
JBOSS and Mysql
"..could not load JDBC driver."
problem with mysql connecton!
ClassNotFoundException Mysql
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 00:03:00.