From: | "Anirban Pal" <anirban(dot)pal(at)newgen(dot)co(dot)in> |
---|---|
To: | "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>, <pgsql-novice(at)postgresql(dot)org> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Postgres registry access using java |
Date: | 2009-05-28 09:33:23 |
Message-ID: | 64BE563F80E84B7E83DEADC8BAF023B7@central.newgen.local |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-novice |
@ Laurenz Albe, All
1st of all thanks for your kind reply. But I can access registry values
using java. The problem I am facing is, in case of postgres settings
informations are kept under a subdirectory named after the product key. I am
able to access from the registry if the path is unique for all the
computers. Since product key is different for each installed computer, my
code written for one computer will not work in another. If it is possible to
traverse folders under registry pane, as seen left side of registry, my
problem will be solved. In my computer.
HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\{B823632E-3B72-4514-8865-B961CE263224}
The last value is different from machine to machine. I am able to fetch key
values upto HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations. But not
after that. Yes it is true registry will not make code compatible for linux,
but I have OS checking part in my code. So, registry part will not run while
on linux. I have different logic (sompe file reading/scanning) for linux ,
solaris.
Regards
Anirban
Anirban Pal wrote:
> Can any body tell me how to fetch directory path for lib or
> data directory for postgres installation in windows using
> registry. Solution using Java language will be highly solicited.
Java does not give you access to the Windows registry as this is not
portable to other operating systems.
You'd have to use native methods.
Yours,
Laurenz Albe
Disclaimer :- This e-mail and any attachment may contain confidential, proprietary or legally privileged information. If you are not the original intended recipient and have erroneously received this message, you are prohibited from using, copying, altering or disclosing the content of this message. Please delete it immediately and notify the sender. Newgen Software Technologies Ltd (NSTL) accepts no responsibilities for loss or damage arising from the use of the information transmitted by this email including damages from virus and further acknowledges that no binding nature of the message shall be implied or assumed unless the sender does so expressly with due authority of NSTL.
From | Date | Subject | |
---|---|---|---|
Next Message | Albe Laurenz | 2009-05-28 09:58:01 | Re: Postgres registry access using java |
Previous Message | Albe Laurenz | 2009-05-28 08:48:18 | Re: Postgres registry access using java |
From | Date | Subject | |
---|---|---|---|
Next Message | Albe Laurenz | 2009-05-28 09:58:01 | Re: Postgres registry access using java |
Previous Message | Albe Laurenz | 2009-05-28 08:48:18 | Re: Postgres registry access using java |