Hi,
I'm new to JDBC and trying to write a simple program to connect to Cache database. the program is pasted below.
import java.sql.*;
public class jdbc
{
public static void main(String args[])
{
String url="jdbc:Cache://localhost:1972/USER";
String username="_SYSTEM";
String password="SYS";
try
{
Class.forName ("com.intersys.jdbc.CacheDriver");
}
catch (java.lang.ClassNotFoundException e)
{
System.err.print("ClassNotFoundException: ");
System.err.print(e.getMessage());
return ;
}
try
{
Connection conn = DriverManager.getConnection(url, username, password);
}
catch(Exception e)
{
System.out.println("Crap");
}
}
}
Its compiling fine, but when I run it, it gives the error which I have specified in the subject line. I have included the CacheDB.jar file in the CLASSPATH of user variables, which is C:\InterSystems\Cache\Dev\java\lib\JDK14;, but still I get this error. Please help if anyone knows the cause.