Problem in connecting with SQL Server 2000

Hi everybody.

I m new 2 this forum. I am a facing a problem while I am trying to connect my Java Application with SQL Server 2000 installed in my system.

I made a JSP in which I wrote the same code as the following codes to connect with SQL Server 2000 database and it is running successfully . At the same machine I am also trying to connect the same database in my simple java application (i.e in main () method ), but it throwing an ClassNotFound exceptio[[ java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver ]]. I installed SQL Server driver SP 1 from MicroSoft's site and also added the path of 3 files in lib directory in the CLASSPATH .

/*******************************************

public class AutoMain {

public static void main(String args[]){

Connection con=null;

try

{

Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");

con=DriverManager.getConnection("jdbc:microsoft:sqlserver://id-10:1433;DatabaseName=myDB;SelectMethod=cursor",username,password);

if ( con != null ){

System.out.println("Connection established");

}

con.close();

}catch( Exception e){

e.printStackTrace();

}

}

********************************************** */

Please help me out .

[1330 byte] By [invincibleBoona] at [2007-10-3 9:14:41]
# 1
What is the full stack trace of the exception? Which line is it coming from?Post the code that works for connecting, also use code tags.
zadoka at 2007-7-15 4:27:13 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2
Thanx for ur cooperation. I have solved the problem. Actually I was using Eclipse SDK but for get to Add external Jar files. In which I need to add the JAR files in the lib directory of Driver's Home Directory Thanx...
invincibleBoona at 2007-7-15 4:27:13 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...