property file not reading

not able to read property file
I am trying below example

wheni run java application by keeping test.proerties file in same package i am getting below error (The system cannot find the file specified)
      at Method)
      at ReadPropertiesFile.main(

please advise
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jan LouwerensSoftware EngineerCommented:
The file doesn't need to be in the package (or even in the source at all), it just needs to be in the same directory that you're running the java program from. (It's a file that's accessed at runtime, not at compile time.) Alternatively, you can specify the path to the file. ("" wilol just mean that it will look in the current working directory at runtime.)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AndyAinscowFreelance programmer / ConsultantCommented:
You don't actually say how you try to open the file yourself.
Check the file actually exists in the path you supply when opening the file.

ps.  At times Windows uses an internal method to locate some files in special locations (eg. the user specific directories - multiple languages, same path internally).  What you see as a path in explorer is a translation of the real path.  So be careful if you hard code the path.
AndyAinscowFreelance programmer / ConsultantCommented:
The file is probably not where it is expected to be by a false assumption being made
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.