Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

property file problems
I am trying to read a property file.. using the code,

properties.load(new FileInputStream("SessionInit.properties"));

this property file is in the same package as my source file... still it
gives me FileNotFoundException.

i have tried giving ./SessionInit.properties and different other
options.. but still gives the trouble.. i am using jkd 1.5 and netbeans
IDE v 5.0



thanks in advance.
sarath


Report this thread to moderator Post Follow-up to this message
Old Post
sarath
01-27-06 08:59 AM


Re: property file problems
"sarath" <sarath.post@gmail.com> wrote in message
news:1138342537.065871.27510@g47g2000cwa.googlegroups.com...
> I am trying to read a property file.. using the code,
>
> properties.load(new FileInputStream("SessionInit.properties"));
>
> this property file is in the same package as my source file... still it
> gives me FileNotFoundException.
>
> i have tried giving ./SessionInit.properties and different other
> options.. but still gives the trouble.. i am using jkd 1.5 and netbeans
> IDE v 5.0
>
>
>
> thanks in advance.
> sarath
>

The file needs to be relative to System.getProperty("user.dir").
Also, your code will leak the file resource if you do not maintain a
reference and call close() in a finally block.

--
Tony Morris
http://tmorris.net/



Report this thread to moderator Post Follow-up to this message
Old Post
Tony Morris
01-27-06 08:59 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Help archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 03:31 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.