Manohar Bhattarai <manoharbhattarai@gmail.com> wrote:
> shows an exception that it cannot find driver.
> Please help me and let me know what i am doing wrong and what i am
> missing.
The jar is not on your classpath, or you are not spelling the class
name ("org.postgresql.Driver") correctly. I don't know of any other
reason that the recommended class loading:
Class.forName("org.postgresql.Driver");
would throw a ClassNotFoundException. (If that's not what you're
doing, or that's not the statement on which it fails, or that's not
your exception, you need to give us more clues.)
> Can you please give an example code if possible?
There are examples here:
http://jdbc.postgresql.org/documentation/84/index.html
-Kevin