import java.io.*; import java.net.*; public class GetJar { public static void main(String args[]) throws Exception { URL url = new URL("http://www.moparscape.org/jar/mudclient135.jar"); System.setProperty("http.agent", "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060907 Firefox/1.5.0.7"); URLConnection con = url.openConnection(); InputStream in = con.getInputStream(); FileOutputStream out = new FileOutputStream("mudclient135.jar", false); byte[] buffer = new byte[con.getContentLength()]; int read = 0, length = buffer.length, portion; while(read < length) read += in.read(buffer); out.write(buffer, 0, buffer.length); out.close(); in.close(); } }