Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #31264

Re: How do you set java to read properties in relative path ?

From Jeff Higgins <jeff@invalid.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: How do you set java to read properties in relative path ?
Date 2015-03-02 10:57 -0500
Organization A noiseless patient Spider
Message-ID <md21i5$rqg$1@dont-email.me> (permalink)
References <3044c107-8eec-4c22-8954-83f1fce6bc6e@googlegroups.com> <def3e5c8-08e8-4bc3-bdeb-fd77eb7eca5a@googlegroups.com>

Show all headers | View raw


On 03/02/2015 09:33 AM, Ajay Paul wrote:
> On Monday, 2 March 2015 16:33:58 UTC+5:30, Ajay Paul  wrote:
>> How do you set java to read properties in relative path in local file system.
>>
>> I can do it absolute path but not in relative path.
>
> Dear All,
>
> In eclipse:
> I have placed my properties file in the same location as the class file. Just want to set a relative path in java to read the values from the properties file. But can't do that. I get the message:
>
> Exception in thread "main" java.io.FileNotFoundException: .\Props.properties (The system cannot find the file specified)
>
> It works fine when I add as an absolute path wrt the file system.
>
> Is there a specific setting in the eclipse which needs to be configured/enabled to do that ?
>
<http://stackoverflow.com/questions/2792870/java-cant-find-file-when-running-through-eclipse>

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How do you set java to read properties in relative path ? Ajay Paul <ajaykpaul@gmail.com> - 2015-03-02 03:02 -0800
  Re: How do you set java to read properties in relative path ? Nigel Wade <nmw@ion.le.ac.uk> - 2015-03-02 12:39 +0000
  Re: How do you set java to read properties in relative path ? Nigel Wade <nmw@ion.le.ac.uk> - 2015-03-02 13:07 +0000
  Re: How do you set java to read properties in relative path ? Ajay Paul <ajaykpaul@gmail.com> - 2015-03-02 06:33 -0800
    Re: How do you set java to read properties in relative path ? Jeff Higgins <jeff@invalid.invalid> - 2015-03-02 10:57 -0500
  Re: How do you set java to read properties in relative path ? Robbie Brown <rob@example.com> - 2015-03-02 16:24 +0000

csiph-web