Reputation: 77
When I run the following code (not including try-catch stuff):
File compressedFile = new File(compressedPathName);
compressedFile.createNewFile();
I am able to successfully create the file, and can find it searching on my computer, but it does not appear in the Eclipse IDE project explorer view. Is there some way that Eclipse can "find" the file so I can open it and edit it via Eclipse?
Thank you!
Upvotes: 0
Views: 1600
Reputation: 2421
Whenever You execute a program, it's launched with the current folder as root. In your case, if you are launching it from IDE itself, it would be the Project Folder in workspace.Any files created from the program are referenced with project folder as root or the folder where you invoked the command from.
the view is loaded periodically and since you created the file from your program it might not reflect all the time.
If you refresh the folder, either by selecting and f5 or by right click and refresh it would fetch all the files from disk again and your newly created files must be visible.
Upvotes: 1