将 Log4j.properties 放在 Eclipse 项目中的正确位置在哪里? [英] Where is the correct location to put Log4j.properties in an Eclipse project?

查看:42
本文介绍了将 Log4j.properties 放在 Eclipse 项目中的正确位置在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我应该在我的 Eclipse 项目中的哪个位置添加 log4j.properties 文件,以便它按预期工作?

Where in my Eclipse project should I add the log4j.properties file so that it will work as intended?

推荐答案

你可以在任何你想要的地方添加它,当你运行你的项目时,配置类路径并通过点击添加 log4j.properties 文件的位置:运行 -> 运行配置 -> [类路径选项卡] -> 单击用户条目 -> 高级 -> 选择添加文件夹 -> 选择 log4j.properties 文件的位置

you can add it any where you want, when you run your project, configure the classpath and add the location of the log4j.properties files by clicking on: Run->Run Configuration -> [classpath tab] -> click on user Entries -> Advanced -> Select Add Folder -> select the location of your log4j.properties file

然后->确定->运行

它应该被加载

这篇关于将 Log4j.properties 放在 Eclipse 项目中的正确位置在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆