Re: Postgres registry access using java - Mailing list pgsql-general

From Anirban Pal
Subject Re: Postgres registry access using java
Date
Msg-id 64BE563F80E84B7E83DEADC8BAF023B7@central.newgen.local
Whole thread Raw
In response to Postgres registry access using java  ("Anirban Pal" <anirban.pal@newgen.co.in>)
Responses Re: Postgres registry access using java  (Dave Page <dpage@pgadmin.org>)
Re: Postgres registry access using java  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
List pgsql-general
@  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.
Ifyou 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.
NewgenSoftware Technologies Ltd (NSTL)  accepts no responsibilities for loss or damage arising from the use of the
informationtransmitted by this email including damages from virus and further acknowledges that no binding nature of
themessage shall be implied or assumed unless the sender does so expressly with due authority of NSTL.  


pgsql-general by date:

Previous
From: "Anirban Pal"
Date:
Subject: Re: Postgres registry access using java
Next
From: miller_2555
Date:
Subject: Re: Multidimensional array definition in composite type appears parsed as string