Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Java.Lang.ClassNotFoundException: sun/jdbc/odbc/JdbcOdbcDriver

218 views
Skip to first unread message

Joseph

unread,
Jun 1, 1998, 3:00:00 AM6/1/98
to

hi,
I try to access a odbc-database.
After compiling my code without errors and running the app,
I get the following error-message:
Java.Lang.ClassNotFoundException: sun/jdbc/odbc/JdbcOdbcDriver
Here's the important part of my code:
import java.sql.*;
class Sample
{
static Connection con; // database connection object
/** Main routine */
public static void main(String args[]) throws Exception
{
System.out.println("try to load driver...");
Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
System.out.println("... driver loaded");
...
}
What is wrong?
I looked in my CLASSPATH-directory for a class called JdbcOdbcDriver,#
but I didn't find it.
Who is able to help?
Please mail to
Joseph
gie...@ism.de

al_gi...@my-dejanews.com

unread,
Jun 2, 1998, 3:00:00 AM6/2/98
to

In article <6kuj7j$ic0$1...@goof.de.uu.net>,

You don't appear to have the JDBC-ODBC bridge on your machine. This can be
downloaded from java.sun.com

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading

R. Krishna Kumar

unread,
Jun 2, 1998, 3:00:00 AM6/2/98
to

Hi,

You might want to make sure that your classpath is correct when you *run*
the app (as opposed to when you compile it). This may depend on the
environment you're using when you compile and run (whether you're using
javac from the command line, or an IDE)

Krishnakumar

Joseph <gie...@ism.de> wrote in article <6kuj7j$ic0$1...@goof.de.uu.net>...

0 new messages