我正在尝试从yDoc库生成uml图.它基本上使用Javadoc来解析Java源文件.但是,当我尝试从终端(OS X)执行命令时,出现以下错误:
I am trying to generate the uml diagram from yDoc library. It basically uses Javadoc to parse tha Java source files. However, when I am trying to execute the command from terminal(OS X), I am getting following error:
javadoc: error - In doclet class ydoc.doclets.YStandard, method start has thrown an exception java.lang.reflect.InvocationTargetException java.lang.NoSuchMethodError: com.sun.tools.doclets.internal.toolkit.taglets.TagletManager. getConstructorCustomTags()[Lcom/sun/tools/doclets/internal/toolkit/taglets/Taglet; at ydoc.doclets.F$_A.<init>(Unknown Source) at ydoc.doclets.F.B(Unknown Source) at ydoc.doclets.F.E(Unknown Source) at ydoc.doclets.J.setSpecificDocletOptions(Unknown Source) at com.sun.tools.doclets.internal.toolkit.Configuration.setOptions(Configuration.java:560) at ydoc.doclets.J.setOptions(Unknown Source) at ydoc.doclets.C.A(Unknown Source) at ydoc.doclets.YStandard.start(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:310) at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:189) at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:366) at com.sun.tools.javadoc.Start.begin(Start.java:219) at com.sun.tools.javadoc.Start.begin(Start.java:205) at com.sun.tools.javadoc.Main.execute(Main.java:64) at com.sun.tools.javadoc.Main.main(Main.java:54)我运行了以下执行命令:
I ran the following execution command:
javadoc @doc/examples/options.sample.linux <Java file path>从Eclipse IDE尝试时,我也遇到相同的错误.
I am also getting same error when trying from Eclipse IDE.
推荐答案@codeblues和@Grant M,我刚刚注意到了这个问题.我是该博客文章 Grant M的作者提及.我只是再次尝试了我的指令,就可以按预期获得带有UML图的Javadoc.
@codeblues and @Grant M, I just noticed this question. I am the author of that blog post Grant M mentioned. I just tried my instructions again, I am getting Javadoc with UML diagram as expected.
在我看来,这听起来像JDK(和JavaDoc)与Ydoc.jar之间的版本不匹配.与Javadoc相关的类位于jdk \ lib文件夹中的一个名为tools.jar的jar中.您可能要检查类路径,以查看它是否包含正确的JDK.您可能可以尝试在* nix上使用哪个javadoc(或在Win 7+上使用"where javadoc"找出使用的JDK位置).
To me, this sounds like a version mismatch between JDK (and JavaDoc)and Ydoc.jar. Javadoc related classes are in a jar called tools.jar in jdk\lib folder. You may want to check your classpath to see if it includes the right JDK. You can probably try which javadoc on *nix (or "where javadoc" on Win 7+ to find out the JDK location used).
在您的异常中提及未知源"似乎表明您指向的是JRE而不是JDK?此外,请参见此有关Java异常中(未知来源)"的堆栈溢出帖子.
The mention "Unknown source' in your exception seems to indicate you are pointing to JRE instead of JDK?? Also, see this Stackoverflow post about "(unknown source)" in Java Exceptions.
我希望您能使它正常工作,以查看UML跳入Javadoc!
I hope you can get this to work, to see the UMLs jump into your Javadoc!
HTH
山姆
更多推荐
Javadoc错误
发布评论