problems with pg_restore and java - Mailing list pgsql-general

From Miguel Angel Hernandez Moreno
Subject problems with pg_restore and java
Date
Msg-id CAGYOd3oTiQNTFxyTW5zJQYbjvhRw_bByU6YpB9ZfL6sz6sDLTA@mail.gmail.com
Whole thread Raw
Responses Re: problems with pg_restore and java  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-general
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 i
n 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

--
ISC Miguel Angel Hernandez Moreno

pgsql-general by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: conditional insert
Next
From: Merlin Moncure
Date:
Subject: Re: problems with pg_restore and java