A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA Java SE 8 Programmer I Study Guide
this week in the
Java in General
How to set the location of the property file in the class path
Joined: Oct 22, 2004
Apr 06, 2006 00:09:00
i need to read a property file.If i give the full path say "c:\example\test.properties" its working fine.But in the code i need to only mention the property file name and set the path of this property file in the class path.
Properties prop = new Properties(new
and the location c:\example should not be specified here.It should be automatically detected.I tried setting this in the classpath but still it cannot recognise the file location.Kindly help me out.
Sunil Kumar Gupta
Joined: Aug 26, 2005
Apr 06, 2006 00:23:00
Lack of will power has caused more failure than lack of intelligence or ability.
Daily Technology Tips
I agree. Here's the link:
subject: How to set the location of the property file in the class path
location of a property file
error in opening zip file
Using PropertyPlaceholderConfigurer to read in external properties - not working
Including property file in the jar
How to read properties file?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015