Re: Can't connect to posgresql through the jdbc driver - Mailing list pgsql-jdbc

From Thomas Kellerer
Subject Re: Can't connect to posgresql through the jdbc driver
Date
Msg-id hml239$acm$1@dough.gmane.org
Whole thread Raw
In response to Re: Can't connect to posgresql through the jdbc driver  (Craig Ringer <craig@postnewspapers.com.au>)
List 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
databasewhich parameters (DB name , userName,Password ) I pass through netbeans config file option (under the "run"
sectionin 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 -
mostuser-friendly - create an executable jar file that defines all needed libraries. 

Thomas

pgsql-jdbc by date:

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