在哪里可以把我想要阅读的txt文件放在Java中? [英] Where do I put the txt file that I want to read in Java?
本文介绍了在哪里可以把我想要阅读的txt文件放在Java中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
右键单击项目文件夹,然后单击新 - >文件。该文件将在Project文件夹中,而不在源文件夹中。
If I am building an application in Eclipse using Java, and I want this application to read from a txt file, where should I put the txt file in the package in order to not have to specify its path (so that I can just say "file.txt"). I thought that it was supposed to go in the src folder, but it's not working.
解决方案
Right click the project folder and click New -> file. The file will be in the Project folder and not in the source folder.
这篇关于在哪里可以把我想要阅读的txt文件放在Java中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文