String home = System.getProperty("user.home"); File file = new File(home+"/Downloads/" + fileName + ".txt");