[英]FileNotFoundException error in intellij for a file in src folder
I was working on a project which was working fine till yesterday.我正在从事一个项目,该项目直到昨天都运行良好。 I don't know if I changed some setting or what but now its not reading files in the src folder.
我不知道我是否更改了某些设置或什么,但现在它没有读取 src 文件夹中的文件。
I made a new demo project just to check if the problem exist in my code of IDE setting for reading a test file and printing it buit eventhat is giving the same error.我制作了一个新的演示项目,只是为了检查我的 IDE 设置的代码中是否存在问题,以读取测试文件并打印它,即使它给出了相同的错误。
As you can see members.txt exist in the src folder as I said.Moreover when I hoverover member.txt in code it is giving me the full details of file like abs path, size and all, which tells that atlease IDE is able to access the file as well.正如我所说的,src 文件夹中存在 members.txt。此外,当我在代码中将鼠标悬停在 member.txt 上时,它会为我提供文件的完整详细信息,如 abs 路径、大小等,这表明 atlease IDE 能够也可以访问该文件。
The default working directory for Intellij is the root directory of the project. Intellij 的默认工作目录是项目的根目录。
You can change this in the build / run configuration, add 'src/' to the file path you use to create the Scanner or move the file into the root directory您可以在构建/运行配置中更改此设置,将“src/”添加到您用于创建扫描仪的文件路径或将文件移动到根目录
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.