unable to connect java program with postgresql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • devgupta01
    New Member
    • Jan 2008
    • 20

    unable to connect java program with postgresql

    prerequisite:
    1. OS as XP
    2. postgresql should be installed
    3. postgresql-8.2-506.jdbc3.jar

    I followed these steps:
    1. create java pragram
    2. open command promt and change directory where i have java program and jar file
    3. set classpath="post gresql-8.2-506.jdbc3.jar"
    4. javac ABC.java
    5. java ABC
    6. get the exception java.lang.Class NotFound: org.postgresql. Driver

    >>>>>>>>>>
    Could u plz suggest how to compile the and run java program
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by devgupta01
    prerequisite:
    1. OS as XP
    2. postgresql should be installed
    3. postgresql-8.2-506.jdbc3.jar

    I followed these steps:
    1. create java pragram
    2. open command promt and change directory where i have java program and jar file
    3. set classpath="post gresql-8.2-506.jdbc3.jar"
    4. javac ABC.java
    5. java ABC
    6. get the exception java.lang.Class NotFound: org.postgresql. Driver

    >>>>>>>>>>
    Could u plz suggest how to compile the and run java program
    Make that:
    Code:
    3. set classpath=.;./postgresql-8.2-506.jdbc3.jar
    kind regards,

    Jos

    Comment

    Working...