Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mysql and jdbc

 
wsswh wsswh
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi: everyone
when i doing a program ---
# java MysqlJDBCDemo
error ---
Exception in thread "main" java.lang.NoClassDefFoundError: MysqlJDBCDemo
-----end
My platform is redhat8.0
I had downloaded mysql,mysql-connector-java-3.0.2-beta.tar.gz,jakarta-tomcat-connectors-4.1.12-src.tar.gz,
j2sdk-1_4_01-linux-i586-rpm.bin and them had setuped
My profile :
TOMCAT_HOME=/opt/tomcat
JAVA_HOME=/usr/java/j2sdk1.4.1_01
CLASSPATH=/usr/java/j2sdk1.4.1_01/:usr/java2/lib/tools.jar:/usr/java/j2sdk1.4.1_01/
lib/dt.jar:/root/stady:/usr/java/mysql-connector-java-3.0.2-beta:/usr/java/
mysql-connector-java-3.0.2-beta/mysql.jar
PATH=$PATH:$JAVA_HOME/bin:/usr/java/j2sdk1.4.1_01/bin:/myswh/stady:/opt/
tomcat/bin:/opt/tomcat/common/lib/mysql.jar:/opt/tomcat/common/lib/
mysql-connector-java-3.0.2-beta.jar:$JAVA_HOME/jre/bin
export JAVA_HOME CLASSPATH PATH TOMCAT_HOME

----------
MysqlJDBCDemo.java
String mySqlDriver = "org.gjt.mm.mysql.Driver";
String url = "jdbc:mysql://localhost:3306/students?user=root;password=";
help me!!!
thanks at first!
wsswh
[ December 22, 2002: Message edited by: wsswh wsswh ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic