title: What happens if I don't close things like channels, streams and remote connections?
body: <p>I'm working on a program using JSch to connect to a remote unix server. I also am connecting to a Hive database with jdbc and a distributed filesystem with Apache Hadoop HDFS API. I have been casually including the close() methods when I see they're available but there's growing frustration about trying to close the channels/connections when using a try/catch/finally block.</p>
  
  <p>What is the actual consequence to leaving a stream, channel, or connection open? Does it affect the remote machine in a negative way? Do all streams automatically close when the program ends?</p>