Details/versions:
psql 7.4.6
java version "1.5.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
grabbed pg74.215.jdbc3.jar and put it in /usr/share/java
symlinked /usr/share/java/postgresl.jar to pg74.215.jdbc3.jar
have tried $CLASSPATH=/usr/share/java/postgresql.jar:. and $CLASSPATH=/usr/share/java/:.
Used the test file at [link|http://www.telenovela-world.com/~spade/linux/howto/Enterprise-Java-for-Linux-HOWTO-6.html|http://www.telenovel...inux-HOWTO-6.html] under Confirming Your Installation. (Corrected the missing curly brace at the end.) Try to compile and get this:
Googled for an hour to find that the code linked above doesn't catch all the exceptions. Added:drook@droogy:~/java/code$ javac PostgreSQLTest.java\nPostgreSQLTest.java:7: unreported exception java.lang.ClassNotFoundException; must be caught or declared to be thrown\nClass.forName("postgresql.Driver").newInstance();\n^\nPostgreSQLTest.java:7: unreported exception java.lang.InstantiationException; must be caught or declared to be thrown\nClass.forName("postgresql.Driver").newInstance();\n^\n2 errors
and a few other 'catch'es. Now get this:} catch (ClassNotFoundException cnfe) {\n System.out.println("ClassNotFoundException");\n System.out.println(cnfe.toString());\n
drook@droogy:~/java/code$ java PostgreSQLTest\nClassNotFoundException\njava.lang.ClassNotFoundException: postgresql.Driver\n