Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add logging.properties to the classpath of an Eclipse project?

I'm using Eclipse 3.7.1 and my code isn't seeing my logging.properties file. (I thought it would see it automatically because it is in the standard place within the JRE but that is apparently wrong). I've been told I need to add this file to the root of the classpath but I'm not sure how to do that.

Eclipse gives me ways to add jars, libraries, variables and other things to the classpath but I don't know how to add a properties file. Can anyone clue me in? You'd think it would be easier to add a simple text file than to add a jar but I don't see any options for text files or property files so I'm not sure how to proceed.

like image 433
Anonymous Coward Avatar asked Feb 27 '12 19:02

Anonymous Coward


1 Answers

Right click on your project->Run/Debug Settings->Edit the launch configuration you are using->Switch to Classpath tab->Right Click User Entries->Add the Folder (or External Folder) containing your properties file->Click Apply . I am assuming you are referencing to a console application here.

If you put the properties file in the root level of the project (that's where the project folder is created), then it should be automatically included in the class path.

You should know that a CLASSPATH never includes specific files. It generally includes folders, jars, etc.

like image 78
CoolBeans Avatar answered Nov 14 '22 22:11

CoolBeans