Reading from a file...

Hello!

I've an application which has a class

com.mycomp.mypack.Utils

In this class I put something like this

FileInputStream in =new FileInputStream

("app.properties");

The properties file is located directly under /src folder

I got an exception: no such file or folder

How should I call the FileInputStream to fix this?

How can I obtain the absolute path of app.properties file?

Thank you very much

With best regards,

S

[544 byte] By [Sorin_Ciolofana] at [2007-11-27 6:09:18]
# 1
> FileInputStream in = new FileInputStream> ("app.properties");That will only work if the file app.properties is present in the current working directory of the application. Kaj
kajbja at 2007-7-12 17:12:56 > top of Java-index,Java Essentials,Java Programming...
# 2
I've a web service project named MyWebService Should I place the properties file directly under the MyWebService folder?
Sorin_Ciolofana at 2007-7-12 17:12:56 > top of Java-index,Java Essentials,Java Programming...
# 3
> I've a web service project named MyWebServiceNow you say so. Post your question in the appropriate forum,the one for Web Services: http://forum.java.sun.com/forum.jspa?forumID=331
Hippolytea at 2007-7-12 17:12:56 > top of Java-index,Java Essentials,Java Programming...