Search Postgresql Archives

Re: Postgres registry access using java

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



@  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.

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux