java 无法导入 org.apache.log4j.Logger
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12676356/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Unable to Import org.apache.log4j.Logger
提问by user1685091
I am unable to import the library org.apache.log4j.Logger
using JDeveloper 10.1. What is the procedure to do that?
我无法org.apache.log4j.Logger
使用 JDeveloper 10.1导入库。这样做的程序是什么?
Thanks in advance.
提前致谢。
回答by Angel
Right button on the project name (in navigator panel)/ properties/Libraries and classpath/add jar-directory and select the log4j.jar or download it from the internet press ok and add the correct import when requested on your code.
项目名称上的右键(在导航器面板中)/属性/库和类路径/添加 jar-directory 并选择 log4j.jar 或从互联网上下载它按确定并在您的代码要求时添加正确的导入。
回答by DoesEatOats
If you do not have the jar file in the project directory, it can be downloaded from here. http://www.java2s.com/Code/Jar/l/Downloadlog4j1215jar.htm
如果项目目录下没有jar文件,可以从这里下载。 http://www.java2s.com/Code/Jar/l/Downloadlog4j1215jar.htm
The next step is to add the import in your java class file as:
下一步是将导入添加到您的 java 类文件中:
import org.apache.log4j.Logger;
导入 org.apache.log4j.Logger;