Thread: Some Questions about JDBC

Some Questions about JDBC

From
Date:
hello
i am a beginer in Java.

i want to use your software PostgreSQL to study DateBase.

Now,i hava some mistakes following … when i use "Class.forName( "org.postgresql.Drvier" );" then


D:\temp\ch18\fig18_24>java TableDisplay
Failed to load JDBC/ODBC driver.
java.lang.ClassNotFoundException: org.postgresql.Drvier
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:164)
        at TableDisplay.<init>(TableDisplay.java:25)
        at TableDisplay.main(TableDisplay.java:144)

how can i do ?
write ".;C:\Program Files\PostgreSQL\8.0\jdbc" in the classpath ?
Or where should i put the "postgresql-8.0.309.jdbc3.jar" ?
In the "D:\Java\Java\jdk1.5.0_01\jre\lib\ext" ? or other ways ?


Re: Some Questions about JDBC

From
Jan de Visser
Date:
On March 2, 2005 04:34 am, tombcy@sohu.com wrote:
> org.postgresql.Drvier"

Try org.postgresql.Driver

Jdv!!

--
--------------------------------------------------------------
Jan de Visser                     jdevisser@digitalfairway.com

                Baruk Khazad! Khazad ai-menu!
--------------------------------------------------------------