Results 1 to 5 of 5
- 09-29-2011, 09:55 AM #1
Member
- Join Date
- Sep 2011
- Posts
- 8
- Rep Power
- 0
How can I add properties file into eclipse classpath ?
Hi,
I am using a code from an open source project. This code is not well documented.
There is a classpath problem but i am new in eclipse.
This is the code :
static {
InputStream input = null;
try {
input = Thread.currentThread().getContextClassLoader().get ResourceAsStream("cmet-file.properties");
_config.load(input);
} catch (Exception ex) {
System.err.println("Could not load properties. Be sure it's in classpath. " + ex.getMessage());
This is the error "Could not load properties. Be sure it's in classpath"
How can I add this file in the classpath ?
I have attempted the following :
1. Go to Java build path of the project
2. Go to libraries tab
3. Add external class folder
4 . Choose the folder containing the properties file
5. The problem is still there.
How can I fix this problem ?
Thanks
- 09-29-2011, 09:59 AM #2
Re: How can I add properties file into eclipse classpath ?
Hi Where is cmet-file.properties in your project?
Skype: petrarsentev
http://TrackStudio.com
- 09-29-2011, 10:29 AM #3
Member
- Join Date
- Sep 2011
- Posts
- 8
- Rep Power
- 0
Re: How can I add properties file into eclipse classpath ?
Hi, it is in a build folder on the root of the project.
- 09-29-2011, 10:32 AM #4
Re: How can I add properties file into eclipse classpath ?
But It must be in a src folder. Like this
/project/
/project/src/
/project/src/*.propertiesSkype: petrarsentev
http://TrackStudio.com
- 09-29-2011, 10:39 AM #5
Member
- Join Date
- Sep 2011
- Posts
- 8
- Rep Power
- 0
Similar Threads
-
checking runtime classpath in Eclipse
By debu37 in forum EclipseReplies: 3Last Post: 11-23-2012, 01:29 AM -
eclipse shiro classpath problem...
By kievari in forum EclipseReplies: 4Last Post: 09-28-2011, 12:25 PM -
Reading properties file
By nn12 in forum New To JavaReplies: 2Last Post: 01-31-2011, 04:41 PM -
Unable to access velocity.properties file from jar file
By mjwoodford in forum New To JavaReplies: 0Last Post: 10-09-2009, 01:46 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks