I have simple class. Then I try to compile and run it I see ClassNotFoundException.
import java.sql.*;
public class DBProcessor{
private static String serverAd
If the postgresql.jar file is not accessible to the Java runtime environment you will get a 'java.lang.ClassNotFoundException: org.postgresql.Driver' exception.
The easiest way to make the postgresql jdbc driver accessible to your applications is to install it as a Java Extension. The only thing you need to do is cp, mv or ln the postgresql.jar file into the Java extension directory. There is no need to set CLASSPATH if you do this. The Java extension directory is $JAVA_HOME/jre/lib/ext ($JAVA_HOME on my system is /usr/java/jdk1.3) or for Windows C:\Program Files\Java\jdk1.8.0_25\jre\lib\ext
This makes life REALLY easy; I didn't have to set CLASSPATH at all in my environment again!