List:MySQL and Java« Previous MessageNext Message »
From:Christian Mack Date:April 23 1999 6:49pm
Subject:Re: mm.mysql drivers.
View as plain text  
Scott Ruttencutter wrote:
> 
> Is there any documentation on how to get the mm.mysql drivers up and
> running on a redhat system?  I'm having the hardest time getting this
> stuff to work!
> 
> Thanks,
> 
> -S
> 
> --------------------\ Scott Ruttencutter
>    viper21@stripped    --------------------
> 
> @---;---- X 12 for the one I love! =)
> 
> On Thu, 22 Apr 1999 mmatthew@stripped wrote:
> 
> > 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>

Hi Scott

Mark has said it all :)

You have to add the JDBC driver jar file to your CLASSPATH environment variable.
Under Unix this is somthing like:
shell> export CLASSPATH=$CLASSPATH:/mysql/twz1/twz1ForMysql.jar

The above will only work as long as you don't logout.
To get it consistent, add it to your '.login' or '.profile' startupscript.
Which of them depends on the shell you use.
In general you can search the Solaris part of the Java documentation and your Redhat man
pages for such questions.

Tschau
Christian

Thread
mysql & jdbc driversRobert H. Thompson22 Apr
  • Re: mysql & jdbc driversAlex Rice22 Apr
  • Re: mysql & jdbc driversSteve Nguyen22 Apr
Re: mysql & jdbc driversJim Ridenour22 Apr
  • Re: mysql & jdbc driversmmatthew22 Apr
Re: mysql & jdbc driversHarald Schlang22 Apr
Re: mysql & jdbc driversJim Ridenour23 Apr
Re: mm.mysql drivers.Christian Mack23 Apr