Home > Java > JavaBase > body text

Java error The system cannot find the specified file Causes and solutions

Release: 2019-12-02 10:28:59
Original
4817 people have browsed it

Java error The system cannot find the specified file Causes and solutions

Exception in thread "main" java.io.FileNotFoundException: E:\photo.JPeG (The system cannot find the specified file.) ( Recommendation: java video tutorial)

Then go to the E drive and see that there are files. What’s going on? Then I wonder if the file format is correct, but I see in the directory that it is in jpeg format. no problem.

Later I learned that what is displayed in this place is not necessarily correct. You can display the extension name or open cmd, cd to the file directory and enter dir.
As you can see, the file format in cmd is no longer jpeg.

Java error The system cannot find the specified file Causes and solutions

Changing JPEG to jpg will solve the problem.

Solutions to such problems:

1. Check whether the file name is correct

2. Check whether the file suffix is ​​correct

For more Java knowledge, please Pay attention to the java basic tutorial column.

The above is the detailed content of Java error The system cannot find the specified file Causes and solutions. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!