1

Java URLConnection on linux mac

view story
linux-howto

http://stackoverflow.com – I have following code URL url = new URL("http://internalsite"); URLConnection conn = url.openConnection(); BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream())); String inputLine; System.out.println(conn); When I opens this windows it works fine But when I opens this in Mac/ Linux I got following error java.io.IOException: Server returned HTTP response code: 401 for URL: http://internalsite at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1459) Any idea how to make it work in linux/Mac? Thanks (HowTos)