Hi,
Could you help me in my program JAVA with jdbc Postgre
import java.sql.DriverManager;
import java.sql.Connection;
import java.sql.SQLException;
public class Example2 {
public static void main(String[] argv) {
System.out.println("Checking if Driver is registered with DriverManager.");
try {
Class.forName("org.postgresql.Driver");
} catch (ClassNotFoundException cnfe) {
System.out.println("Couldn't find the driver!");
System.out.println("Let's print a stack trace, and exit.");
cnfe.printStackTrace();
System.exit(1);
}
}
Then I execute :
javac Example2.java
Then I execute
java Example2
but I get
Exception in thread "main" java.lang.NoClassDefFoundError: Example
Wich is my error ?
I copied pg73jdbc3.jar in my path
C:\j2sdk1.4.1_07\lib\
Its have org.postgresql.Driver
Thanks advanted
ana