Why am I getting a ClassCastException when generating javadocs?

后端 未结 4 1013
日久生厌
日久生厌 2020-12-08 09:19

I\'m using ant to generate javadocs, but get this exception over and over - why?

I\'m using JDK version 1.6.0_06.

[javadoc] java.lan         


        
4条回答
  •  清歌不尽
    2020-12-08 09:35

    I got this problem too. I can compile properly without any errors or warnings. But when I generating javadoc , I got below error.

    [javadoc] java.lang.ClassCastException: com.sun.tools.javadoc.ClassDocImpl cannot be cast to com.sun.javadoc.AnnotationTypeDoc

    Here is my classpath loading for my third-party-libs ...

    
    
        
    
    

    At my java compile target ..

    
    
      
    
    

    And at my javadoc target...

    
    
       
                
       
    
    
    
    

    So , I added classpathref="build.classpath" option to tag. Now It is fine for me.

提交回复
热议问题