With your IDE (at least all the ones I've worked with), the working directory is the ProjectRoot. The working directory is C:\EclipseWorkspace\ProjectRoot\bin. The working directory, can be described as this:Ĭ:\EclipseWorkspace\ProjectRoot\bin > java 1 When you use File or any of the other FileXxx variants, you are looking for a file on the file system relative to the "working directory". Put the word.txt directly as a child of the project root folder and a peer of src Project_Rootĭisclaimer: I'd like to explain why this works for this particular case and why it may not work for others.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |