as noted,
Does java jdbc driver for postgresql have client side \ copy?
I wanted to do batch insertions into a table in a database on a remote machine with data from my text file on another machine.
Since driver 8.4 supports the COPY command, through CopyManager:
http://jdbc.postgresql.org/documentation/publicapi/org/postgresql/copy/CopyManager.html
add the ip of your system from where you used to update the database in the pg_hba.conf file connect usinyg url
jdbc:postgresql://host:port/database
fulfill the request