Re: Can't connect to posgresql through the jdbc driver

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Can't connect to posgresql through the jdbc driver
Date: 2010-03-03 07:11:39
Message-ID: hml239$acm$1@dough.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Craig Ringer, 03.03.2010 04:20:
>> I set it to the jar file as written above
>
> No, you didn't. You set it to the folder CONTAINING the jar. Try:
>
> CLASSPATH=$CLASSPATH:/opt/PostgreSQL/pgJDBC/postgresql-8.4-701.jdbc.jar
>
>> I am using netbeans 6.8 ... The project I chose was a java application . The application is supposed to connect to a database which parameters (DB name , userName,Password ) I pass through netbeans config file option (under the "run" section in the menu. I also tried to run it manually with this line:
>
> Eh? If you're using NetBeans, why are you messing with the CLASSPATH
> environment variable?

Actually nowadays one should never use a system wide CLASSPATH, because it simply leads to a lot of problems.

Either the IDE manages that or the classpath is defined using the -cp parameter when starting the Java program. Or - most user-friendly - create an executable jar file that defines all needed libraries.

Thomas

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Achilleas Mantzios 2010-03-03 08:34:43 Re: Very Dangerous bug in XA connection pooling and SL EJBs with jboss-4.2.3 & latest postgresql-8.4-701.jdbc3.jar
Previous Message Craig Ringer 2010-03-03 03:20:15 Re: Can't connect to posgresql through the jdbc driver