MySQL Forums
Forum List  »  Microsoft SQL Server

Re: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
Posted by: subari
Date: April 01, 2006 05:23AM

i have same problem ....

my program coding is

import java.sql.Connection;
import java.sql.DriverManager;

public class Koneksi
{
public static void main(String[] args)
{
boolean kesalahan = false;
try
{
Class.forName("com.mysql.jdbc.Driver");
}
catch (Exception ex)
{
System.out.println("Kesalahan "+ex);
kesalahan = true;
}
if (!kesalahan)
{
System.out.println("Koneksi Berhasil");
}
}
}

My classpath is
.;C:\Sun\AppServer\jdk\lib\tools.jar;C:\DriverMysql\debug\mysql-connector-java-3.1.12-bin-g.jar

When i use java -cp . Koneksi, i had error message like this : Kesalahan java.lang.ClassNotFoundException: com.mysql.jdbc.Driver.

I do it in Windows XP pack 2.

Can anyone help me? thank.

Options: ReplyQuote


Subject
Written By
Posted
Re: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
April 01, 2006 05:23AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.