Call close on java connection