title: where to set java.net.preferIPv6Addresses = true
body: <p>I have searched many places of making IPv6 enabled to have a dual-stack machine IPv6.
  I found many have answered to set java.net.preferIPv6Addresses=true which is set to false by default.</p>
  
  <p>I want to know where exactly should I make these changes, i.e in which file or do I have to write some Java code to put this into. </p>