How to add a .txt file to java project

0 votes
asked Feb 5 by DavittMaher (130 points)

1 Answer

0 votes
answered Feb 7 by Paras Sachdeva

Put the file in the folder from where you run your Java application (your current/working folder). If you're using the default settings of Eclipse to run your application, you should put the file directly inside the Eclipse project folder. To create the file in the Eclipse project, you can simply drag-and-drop it there or right-click on the Eclipse project and create a new file.

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.