Search Postgresql Archives

Re: problems with pg_restore and java

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

 



On Thu, Sep 8, 2011 at 10:45 AM, Miguel Angel Hernandez Moreno
<miguel.hdz.mrn@xxxxxxxxx> wrote:
> Hello
>
> I have a program in java to make a backup running pg_restore, If you use
> linux give a successful outcome.
> but if you use windows I mark an error generating the socket. I think that
> it could be the environment variables in Windows.
> My java code is as follows.
>
> String  comando="";
> String env[]={ "PGPASSWORD="+String.valueOf( jPPass.getPassword() ) };
> comando=directorioBinario+" -h "+jTxIP.getText()+" -d
> "+jTxNombreTabla.getText()+" -U "+jTxNombreUsuario.getText()+"  -v -1
> "+archivoRespaldo;
>
> try {
>     p = Runtime.getRuntime().exec(comando,env);   <-------Error in windows
>     InputStream es = p.getErrorStream();
>     arch.muestraSalidaDeError(es);
> } catch (IOException ex) {
>     Logger.getLogger(gPrincipal.class.getName()).log(Level.SEVERE, null,
> ex);
> }
>
> I use my env variable to enter the password of postgres

The error string would be helpful.

merlin

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