This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Can't find mySQL driver when use java as CGI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Can Watch "Can New topic
Author

Can't find mySQL driver when use java as CGI

Frank Ying
Greenhorn

Joined: Jun 29, 2001
Posts: 5
I wrote a java problem called 'search.java' as CGI, that search the mySQL database. I got error said "java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver". Here is my cgi to call the java class: java -classpath /home/frank/cgi-bin/advd:/home/frank/jdk1.3.1_02:/home/frank/var/driver.jar:/home/frank/cgi-bin search $QUERY_STRING
the mySQL driver is /home/frank/var/driver.jar
Thanks for help.
Frank
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

"Frankying",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp .
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please re-register and select a new name which meets the requirements.
Thanks.
Dave
 
Don't get me started about those stupid light bulbs.
 
subject: Can't find mySQL driver when use java as CGI
 
Similar Threads
Netbeans classpath problem
JDBC drivers
MySQL Driver, Help!
class loader problem during connection of MySql driver
classNotFoundException for Driver