11 messages in com.mysql.lists.javaRe: mysql & jdbc drivers
FromSent OnAttachments
Robert H. Thompson21 Apr 1999 13:48 
Alex Rice21 Apr 1999 13:56 
Steve Nguyen21 Apr 1999 23:21 
Jim Ridenour22 Apr 1999 03:19 
Harald Schlang22 Apr 1999 03:31 
mmat...@ecn.purdue.edu22 Apr 1999 06:02 
Scott Ruttencutter22 Apr 1999 11:31 
Jim Ridenour23 Apr 1999 05:04 
Robert H. Thompson23 Apr 1999 06:34 
Christian Mack23 Apr 1999 11:48 
Hans Wolters23 Apr 1999 13:36 
Subject:Re: mysql & jdbc drivers
From:mmat...@ecn.purdue.edu (mmat@ecn.purdue.edu)
Date:04/22/1999 06:02:21 AM
List:com.mysql.lists.java

On Thu, 22 Apr 1999, Jim Ridenour wrote:

At 04:48 PM 4/21/99 -0400, Robert H. Thompson wrote:

I am having a problem with the twz1FM and mm.mysql jdbc drivers for the MySql database. At home I have red hat linux 5.2 kernel 2.0.36 with the latest mysql and twz1ForMysql driver and mm.mysql driver. and the blackdown jdk1.2 port.

1) I explicitly compile with:

javac -classpath /mysql/twz1/twz1ForMysql.jar jdbctest1.java

and the program compiles fine.

I try to run it with:

java jdbctest1

and I get java NoClassDefFound Error

what am I missing here?

You need to have the mysql drivers in your classpath when you run the program as well as when you compile it.

Java doesn't link at compile time, it loads classes at run time, so all classes need to be available at run time as well as compile time.

-Mark