public static void download(String url){ try { recursiveDelete(getWorkingDirectory() + "/launcher/res"); getWorkingDirectory().mkdirs(); new File(getWorkingDirectory() + "/launcher/res").mkdirs(); URL website = new URL(url); ReadableByteChannel rbc = Channels.newChannel(website.openStream()); FileOutputStream fos; fos = new FileOutputStream(getWorkingDirectory() + "/resources.zip"); fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); fos.close(); System.out.println("Download complete, unzipping."); ZipUtils.extract(new File(getWorkingDirectory() + "/resources.zip"), new File(getWorkingDirectory() + "/launcher/res")); System.out.println("Unzipping complete, deleting zip."); if (new File(getWorkingDirectory() + "/resources.zip").delete()) { System.out.println("Deletion completed."); } else { System.out.println("Deletion failed."); } } catch (FileNotFoundException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } catch (IOException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } }