wood burning stoves*
The moose likes Beginning Java and the fly likes Reading A properties file in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Reading A properties file in Java" Watch "Reading A properties file in Java" New topic
Author

Reading A properties file in Java

Maverick Gsp
Greenhorn

Joined: Apr 08, 2013
Posts: 1
[Hi Experts,

I am new to java and trying to develop a program to read a simple properties file through a basic java program,I have attached the corresponding java code also,



I am getting the below error

"java.io.FileNotFoundException: deploy.properties (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at App.main(App.java:15)"

The file is correctly placed at the defined location in the code,can you please confirm as to where am i going wrng?

Looking fwd for guidance from experts.

Regards,
Mav
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10268
    
    8

Welcome to the Ranch.

Your code refers to x.properties whereas the stack trace refers to deploy.properties. Have you posted the correct code?

Also, please check your private messages for an important administrative matter


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Reading A properties file in Java