java.net.URLConnection.getContent() incorrectly specifies the default location of content handler classes as sun.net.www.content. ( this location is implementation specific )
"If no content handler factory has yet been set up, or if the factory's createContentHandler method returns null, then the application loads the class named: sun.net.www.content.<contentType> " This should be changed to something like: <system default package>.<contentType>, similar to what is done in URL [1] Trivial specDiff: http://cr.openjdk.java.net/~chegar/8039470/URLConnection-report.html -Chris. [1] http://docs.oracle.com/javase/8/docs/api/java/net/URL.html#URL-java.lang.String-java.lang.String-int-java.lang.String-