When you create a new File
, you are supposed to provide the file name, not only the directory you want to put your file in.
Try with something like
File file = new File("D:/Data/" + item.getFileName());
More Related Contents:
- Java says FileNotFoundException but file exists
- java.io.FileNotFoundException: the system cannot find the file specified
- java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed
- java.io.FileNotFoundException: (Access is denied)
- java.io.FileNotFoundException in eclipse
- How to reference a File in raw folder in Android
- My temp conversion program
- Example images for code and mark-up Q&As [closed]
- Java arrays printing out weird numbers and text [duplicate]
- custom listview adapter getView method being called multiple times, and in no coherent order
- How to connect SQLite with Java?
- Hibernate openSession() vs getCurrentSession()
- Capture and log the response body [duplicate]
- How to update a value, given a key in a hashmap?
- Java Applet Game 2D Window Scrolling
- What determines Kafka consumer offset?
- Print All JVM Flags
- What’s the advantage of POJO?
- Why is not possible to reopen a closed (standard) stream?
- How to add CheckBox’s to a TableView in JavaFX
- Java: How to draw non-scrolling overlay over ScrollPane Viewport?
- How do annotations like @Override work internally in Java?
- Rotate Marker and Move Animation on Map like Uber Android
- How to print several reports with barcode \ or several barcodes in one report
- How to detect language of user entered text? [closed]
- Java JFrame .setSize(x, y) not working?
- Why do some elements exist but not interactable/displayed?
- Does Java 8 provide a good way to repeat a value or function?
- Transparent status bar – before Android 4.4 (KitKat)
- How does Eclipse actually run Junit tests?