pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
setting CLASSPATH of the jdbc jar file
3+ messages / 3 participants
[nested] [flat]

* setting CLASSPATH of the jdbc jar file
@ 2007-05-24 11:45  Mamoon Rashid <mamoon@imtech.res.in>
  0 siblings, 2 replies; 3+ messages in thread

From: Mamoon Rashid @ 2007-05-24 11:45 UTC (permalink / raw)
  To: pgsql-jdbc

hi all,
i am a newbie using jdbc interface to postgresql.
Information about the machine and pgsql server-
1. system: OS:Enterprise Lnux 4, Server:Apache2
2. PostgreSql 7.4.6

Please tell me that at which prompt(either as a root or postgres user) i
can set CLASSPATH. my jdbc jar file is in
/usr/share/java/pg74.215.jdbc3.jar. i tried as root as well as postgres
user and applied following command:
 export CLASSPATH=/usr/share/java/pg74.215.jdbc3.jar:${CLASSPATH}
After that i looked it with "env" command.it looked well. but when i exit
and reenturned into root as well as postgres user and typed "env" i
couldnt see "CLASSPATH=/usr/share/java/pg74.215.jdbc3.jar".
please suggest how to set classpath and save it.
waiting anxiously
with regard mamoon.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: setting CLASSPATH of the jdbc jar file
@ 2007-05-24 13:01  Leonel <lnunez@gmail.com>
  parent: Mamoon Rashid <mamoon@imtech.res.in>
  1 sibling, 0 replies; 3+ messages in thread

From: Leonel @ 2007-05-24 13:01 UTC (permalink / raw)
  To: Mamoon Rashid <mamoon@imtech.res.in>; +Cc: pgsql-jdbc

On 5/24/07, Mamoon Rashid <mamoon@imtech.res.in> wrote:
> hi all,
> i am a newbie using jdbc interface to postgresql.
> Information about the machine and pgsql server-
> 1. system: OS:Enterprise Lnux 4, Server:Apache2
> 2. PostgreSql 7.4.6
>
> Please tell me that at which prompt(either as a root or postgres user) i
> can set CLASSPATH. my jdbc jar file is in
> /usr/share/java/pg74.215.jdbc3.jar. i tried as root as well as postgres
> user and applied following command:
>  export CLASSPATH=/usr/share/java/pg74.215.jdbc3.jar:${CLASSPATH}
> After that i looked it with "env" command.it looked well. but when i exit
> and reenturned into root as well as postgres user and typed "env" i
> couldnt see "CLASSPATH=/usr/share/java/pg74.215.jdbc3.jar".
> please suggest how to set classpath and save it.
> waiting anxiously
> with regard mamoon.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>


put that  export in

/etc/profile

then logout login to get the changes


-- 
Leonel



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: setting CLASSPATH of the jdbc jar file
@ 2007-05-25 06:31  Albe Laurenz <all@adv.magwien.gv.at>
  parent: Mamoon Rashid <mamoon@imtech.res.in>
  1 sibling, 0 replies; 3+ messages in thread

From: Albe Laurenz @ 2007-05-25 06:31 UTC (permalink / raw)
  To: Mamoon Rashid *EXTERN* <mamoon@imtech.res.in>; pgsql-jdbc

Mamoon Rashid wrote:
> 
> i am a newbie using jdbc interface to postgresql.

You are a newbie to UNIX :^)

> Please tell me that at which prompt(either as a root or 
> postgres user) i can set CLASSPATH. my jdbc jar file is in
> /usr/share/java/pg74.215.jdbc3.jar. i tried as root as well 
> as postgres user and applied following command:

>  export CLASSPATH=/usr/share/java/pg74.215.jdbc3.jar:${CLASSPATH}
> After that i looked it with "env" command.it looked well.

> but when i exit and reenturned into root as well as postgres
> user and typed "env" i couldnt see
> "CLASSPATH=/usr/share/java/pg74.215.jdbc3.jar".

The environment variables you set in your shell are lost when
the shell exits, i.e. when you log out.

In order to make your change persistent, you must write it into a
configuration file that is read by your shell at startup.
Assuming that you use bash, that would be .bash_profile in the home
directory of your user (if you want to set the CLASSPATH only for
this user) or /etc/profile if you want the change for all login users.

Yours,
Laurenz Albe



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2007-05-25 06:31 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-05-24 11:45 setting CLASSPATH of the jdbc jar file Mamoon Rashid <mamoon@imtech.res.in>
2007-05-24 13:01 ` Leonel <lnunez@gmail.com>
2007-05-25 06:31 ` Albe Laurenz <all@adv.magwien.gv.at>

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