From owner-freebsd-java@FreeBSD.ORG Mon Nov 17 09:06:56 2003 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4575816A4CE for ; Mon, 17 Nov 2003 09:06:56 -0800 (PST) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id D05F943FDD for ; Mon, 17 Nov 2003 09:06:54 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) hAHH6nBg092174 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 17 Nov 2003 17:06:50 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id hAHH6noi092173; Mon, 17 Nov 2003 17:06:49 GMT (envelope-from matthew) Date: Mon, 17 Nov 2003 17:06:49 +0000 From: Matthew Seaman To: Roberto Nunnari Message-ID: <20031117170649.GB91222@happy-idiot-talk.infracaninophile.co.uk> References: <3FB8FCBA.4020109@supsi.ch> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EuxKj2iCbKjpUGkD" Content-Disposition: inline In-Reply-To: <3FB8FCBA.4020109@supsi.ch> User-Agent: Mutt/1.5.5.1i X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham version=2.60 X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on happy-idiot-talk.infracaninophile.co.uk cc: java@freebsd.org Subject: Re: ClassNotFoundException X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2003 17:06:56 -0000 --EuxKj2iCbKjpUGkD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 17, 2003 at 05:52:10PM +0100, Roberto Nunnari wrote: > and here's the offending code: >=20 > try { > Class.forName( "org.gjt.mm.mysql.Driver" ); > } > catch( ClassNotFoundException e ) { > e.printStackTrace(); > } Hmmm... Try: Class.forName("com.mysql.jdbc.Driver").newInstance(); The org.gjt.mm.mysql hierarchy is just there for backwards compatibility nowadays. More detailed instructions can be found in /usr/local/share/doc/mysql-connector-java/README (or you can extract that README file from the .jar if necessary). Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --EuxKj2iCbKjpUGkD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/uQApdtESqEQa7a0RAsUpAJ4oLePoVIYQkaHGGf1MIRnFk62z0QCdGZVl 4uB6JhAWnndOusRQaRDzd5k= =CFtY -----END PGP SIGNATURE----- --EuxKj2iCbKjpUGkD--