> The JDBC jar file IS in the CLASSPATH environment variable. The code of
> the program is the following:
> org.postgresql.Driver
> java.lang.ClassNotFoundException: org.postgresql.Driver
This means that the driver jar *isn't* in your classpath.
What is the exact value of your CLASSPATH, have you exported the
CLASSPATH environment variable, where have you placed the driver jar,
and what is the Java command line you are trying?
-O
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
{~/Ixe/Proyectos/tarme}% javac actgastos.java
{~/Ixe/Proyectos/tarme}% echo $CLASSPATH
/usr/local/lib/postgresql.jar:.:
{~/Ixe/Proyectos/tarme}% java actgastos gastos.csv
org.postgresql.Driver
java.lang.ClassNotFoundException: org.postgresql.Driver
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:
274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:
302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at actgastos.main(actgastos.java:8)
No suitable driver
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:532)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at actgastos.main(actgastos.java:15)
{~/Ixe/Proyectos/tarme}% java -cp /usr/local/lib/postgresql.jar:.:
actgastos gastos.csv
{~/Ixe/Proyectos/tarme}%
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend