在我的课程中为外部API使用{@link classname} [英] Using {@link classname} for external API in my class
本文介绍了在我的课程中为外部API使用{@link classname}的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以下内容:
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工具抱怨如下:
This is generating the links to the Logger
class successfully, but the javadoc tooling complains like so:
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);
^
推荐答案
我相信您应该在运行log4j库时将其添加到Javadoc classpath中.否则它不知道它是什么.
I believe you should add the log4j library to Javadoc classpath when running it. Otherwise it can't know what it is.
这篇关于在我的课程中为外部API使用{@link classname}的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文