java-multithread-downloader
java-multithread-downloader copied to clipboard
String index out of range!
java.lang.StringIndexOutOfBoundsException: String index out of range: -1 My code looks like this
String url=urls.get(options_list.getSelectionModel().getSelectedIndex());
String filename = file.getAbsolutePath();
DownloadManager downloadManager = DownloadManager.getInstance();
DownloadMission mission = new DownloadMission(url,"",filename);
downloadManager.addMission(mission);
downloadManager.start();
You may have a problem on the first line of the attached code. Maybe the index is taken wrong
java.lang.StringIndexOutOfBoundsException: String index out of range: -1 My code looks like this
String url=urls.get(options_list.getSelectionModel().getSelectedIndex()); String filename = file.getAbsolutePath(); DownloadManager downloadManager = DownloadManager.getInstance(); DownloadMission mission = new DownloadMission(url,"",filename); downloadManager.addMission(mission); downloadManager.start();
please include the complete exception. since it is not clear if the raised exception is even related to the library.