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
--
Mark Matthews <mmatthew@stripped>
http://www.ccm.ecn.purdue.edu/~mmatthew/
"Computers in the future may weigh no more than 2 tons." -Pop.Mech., 1947