java.io.FileNotFoundException in eclipse

You’ve used a relative file path which is relative to your project execution.

If you’d like to do it that way, simply put the strength.txt file in the base directory of your project. Like so:

enter image description here

Alternatively, you could reference the absolute file path on your system. For example, use:

Windows:

C:/dev/myproject/strength.txt

Mac/Unix:

/Users/username/dev/strength.txt

(or whatever the full path may be) instead.

Leave a Comment