From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-jdbc@postgresql.org
Subject: Re: Can't connect to posgresql through the jdbc driver
Date: Wed, 03 Mar 2010 08:11:39 +0100
Message-ID: <hml239$acm$1@dough.gmane.org> (raw)
In-Reply-To: <4B8DD56F.9040109@postnewspapers.com.au>
References: <759461.26544.qm@web35603.mail.mud.yahoo.com>
<4B8DB392.2020608@postnewspapers.com.au>
<748530.91320.qm@web35603.mail.mud.yahoo.com>
<4B8DD56F.9040109@postnewspapers.com.au>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: spam_eater@gmx.net
Subject: Re: Can't connect to posgresql through the jdbc driver
In-Reply-To: <hml239$acm$1@dough.gmane.org>
References: <759461.26544.qm@web35603.mail.mud.yahoo.com> <4B8DB392.2020608@postnewspapers.com.au> <748530.91320.qm@web35603.mail.mud.yahoo.com> <4B8DD56F.9040109@postnewspapers.com.au> <hml239$acm$1@dough.gmane.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox