So sollte es gehen.Code:package test; import java.io.*; import java.net.*; /** * * @author NSGR */ public class Main { public static void main(String[] args) throws MalformedURLException, IOException { URL u = new URL("http://dieseite.de/file.exe"); URLConnection uc = u.openConnection(); InputStream is = new BufferedInputStream(uc.getInputStream()); OutputStream out = new BufferedOutputStream(new FileOutputStream("deinename.exe")); byte[] b = new byte[1024]; int bla; while ((bla = is.read(b)) != -1) { out.write(b, 0, bla); } out.flush(); out.close(); is.close(); } }