Re; pg_dump from Java - Mailing list pgsql-jdbc

From Michael Schmidt
Subject Re; pg_dump from Java
Date
Msg-id BAY101-DAV121FD09B38064071710341A3CC0@phx.gbl
Whole thread Raw
Responses Re: Re; pg_dump from Java
List pgsql-jdbc
Folks,
I've continued to work on the problem (stubbornness + free time is a deadly combination) and have gotten a solution others might find helpful.  In Java 1.5 (5.0 per their new numbering) there is a new ProcessBuilder class.  It is a different way to create a runtime process that allows setting environmental variables.  Of particular interest is the redirectErrorStream() method, which does just that - combines stderr with stdin.  This simplifies matters - allowing the use of just one BufferedReader and lo and behold - the Password: prompt showed up.  You can't readLine() it, but nevertheless, it is accessible. 
 
Later!
Michael Schmidt

pgsql-jdbc by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: PostgreSQL (XADataSource) as Tomcat Resource
Next
From: Peter Eisentraut
Date:
Subject: Re: Prepared statement leak