X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id B21EB11F6CAF for ; Mon, 10 Apr 2006 07:22:47 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 required=5 tests=[none] Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 7GrynzludAaI for ; Mon, 10 Apr 2006 07:22:40 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.logix-tt.com (unknown [212.211.145.186]) by postgresql.org (Postfix) with ESMTP id AAA9411F6C60 for ; Mon, 10 Apr 2006 07:22:42 -0300 (ADT) Received: from kingfisher.intern.logix-tt.com (p549D1FA2.dip0.t-ipconnect.de [84.157.31.162]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logix-tt.com (Postfix) with ESMTP id 67FDE656C0; Mon, 10 Apr 2006 12:23:33 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id BC2E118161169; Mon, 10 Apr 2006 12:22:54 +0200 (CEST) Message-ID: <443A31FE.5050209@logix-tt.com> Date: Mon, 10 Apr 2006 12:22:54 +0200 From: Markus Schaber Organization: Logical Tracking and Tracing International AG, Switzerland User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Schmidt Cc: PostgreSQL JDBC Subject: Re: Re; pg_dump from Java References: In-Reply-To: X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Archive-Number: 200604/75 X-Sequence-Number: 15009 Hi, Michael, Michael Schmidt wrote: > 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 proces= s > that allows setting environmental variables.=20 Maybe you can also use the appropriate environmental variable to pass the password to pg_dump, it should work for all libpq based applications=B9= =2E http://www.postgresql.org/docs/8.1/interactive/libpq-envars.html This should work even nicer than parsing stdout / stderr. HTH, Markus =B9 Exception is debian, they put wrappers into the path which don't honour those variables, and do their own magic. --=20 Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.= org