I am having a problem with my URLConnection hanging on Windows (
Java 8). From my research there seems to be a known issue with 'URLConnection.SetConnectTimeout' but it appears be be only in versions preceeding 8. What is less clear is how to get some kind of timeout to work. I even tried 'System.setProperty("sun.net.client.defaultConnectTimeout", "10000")'. So what is the correct way to set a connection timeout that really works? TIA.