What may be the reason, that the following could not be compiled on my PC !
Classpath !
File missing !
import java.sql.*;
import java.util.*;
import java.io.InputStream;
public class ConnectMe {
public static void main (
String args[]) {
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch (Exception e) {
System.out.println("Failed to load JDBC/ODBC driver.");
return;
}
}
}
The compiler error is
D:\jdk1.3\ConnectMe.java:11: cannot resolve symbol
symbol : method forName (java.lang.String)
location: class Class
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
^
1 error
Tool completed with exit code 1
Thanks in Advance !