how to install the postgres driver for java


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: how to install the postgres driver for java

  1. #1
    Join Date
    May 2004
    Posts
    15

    how to install the postgres driver for java

    can someone tell me step by step how can i make my postgres driver work with java in my machine?
    Class.forName(org.postgresql.Driver)
    keeps giving me class not found exception and i can't make it work
    i already have the jar file...

    please be very specific...

  2. #2
    Join Date
    Feb 2004
    Posts
    541
    Did you add the jar to your classpath?

    I found this link that seems to be exactly what you want.http://www.faqs.org/docs/ppbook/x20856.htm Hope this helps

  3. #3
    Join Date
    May 2004
    Posts
    15
    no..
    which command do i use to do that?

    my jar file is in C:\Driver.jar
    inside the .jar is the org\postgresql\Driver.class

    how do i set up my classpath for that?

  4. #4
    Join Date
    Feb 2004
    Posts
    541
    There are two ways that I know of. The first is from the command prompt, but I can't remember how to do that myself as i've never used it. The other way is through control panel (this may only be available in later version of windows).

    Go to start/control panel/system...click on the Advanced tab, then the Environment Variables button near the bottom. This will pop up a screen with a list of various environment variables that programs are using. One of them will be CLASSPATH, so click on that and click edit. Add a semi-colon to the end if there isn't already one and then add the path to the jar (obviously leaving whats already there unaltered). That should do it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center