This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, I'm trying to connect to db from a stand-alone class (have done it many times with Tomcat); so copied mysql-connector-java-3.1.6-bin.jar from Tomcat/common/lib to jre/lib and put it in the classpath at compile time, thus:
the jar & class conn are in same dir.. this compiles fine but when try to run it get exact same ClassNotFound error... it can't find com.mysql.jdbc.Driver; but it's there, I looked (this same package works fine in Tomcat, but now am trying to connect to db (MySQL server installed in my HD, to which I connect all the time from Tomcat) from outside Tomcat, from a stand-alone class; you can connect to a db from a stand-alone class, can't you? thank you very much..