我有以下内容:
package test.tester;
import org.apache.log4j.Logger;
public class tester {
private static Logger logger = Logger.getLogger(tester.class);
/**
* {@link org.apache.log4j.Logger}
*
* @param args
*/
public static void main(final String[] args) {
logger.info("test");
}
}
这是成功生成Logger
类的链接,但javadoc工具抱怨如下:
Constructing Javadoc information...
tester.java:3: package org.apache.log4j does not exist
import org.apache.log4j.Logger;
^
tester.java:6: cannot find symbol
symbol : class Logger
location: class test.tester.tester
private static Logger logger = Logger.getLogger(tester.class);
^
答案 0 :(得分:1)
我相信你应该在运行它时将log4j库添加到Javadoc类路径中。否则它无法知道它是什么。