Using {@link classname} for external API in my class
I have the following:
package test.tester;
import org.apache.log4j.Logger;
public class tester {
private static Logger logger = Logger.getLogger(tester.class);
/**
* {@link org.apache.log4j.Logg开发者_运维百科er}
*
* @param args
*/
public static void main(final String[] args) {
logger.info("test");
}
}
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);
^
I believe you should add the log4j library to Javadoc classpath when running it. Otherwise it can't know what it is.
精彩评论