wood burning stoves 2.0*
The moose likes IDEs, Version Control and other tools and the fly likes JavaDoc not showing up Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "JavaDoc not showing up" Watch "JavaDoc not showing up" New topic
Author

JavaDoc not showing up

Meshulam Silk
Greenhorn

Joined: Feb 12, 2012
Posts: 22
I made a jar full of stuff I could use to make a game. I added JavaDoc comments to every single one of the methods. Before I compressed the project into a jar I tested out the comments to see if they show up and they did, but when I compressed it and imported it to a different project, the methods in the jar will work fine and the eclipse suggestions box will recognize them, but their JavaDoc comments don't show up.

Is this normal?
If not what am I missing? What can I do to get those annotations to show (if possible)?

Thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41042
    
  43
What does "the annotations show (not) up" mean? Are these compile-time or runtime annotations (meaning, what is their RetentionPolicy)?


Ping & DNS - my free Android networking tools app
Meshulam Silk
Greenhorn

Joined: Feb 12, 2012
Posts: 22
Ulf Dittmer wrote:What does "the annotations show (not) up" mean? Are these compile-time or runtime annotations (meaning, what is their RetentionPolicy)?

I'm not quite sure what type of annotations they are as I don't really know how annotations work. All I know is that I put this block in front of a method, then when showing the suggestions box while coding I can see what that method does.

For example:
I put this in the base class

Will show me this when editing in a test class (the yellow box):


However this will only happen if I'm writing in the same project as the method I'm calling. If I import the method as part of an external jar to another project the yellow box will not show up and show me the annotation.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

That comment in front of the method is not an annotation. Annotations are something completely different, you were confusing Ulf by calling this an annotation. That comment is a JavaDoc comment. With the JavaDoc tool you can convert this to a set of HTML pages that contain API documentation, in the same way as the API documentation for the standard Java library.

If you're using Eclipse, and you've added a JAR file as a library to your project, then you can attach sources and JavaDoc to the JAR file. Right-click the JAR file in the list of dependencies of the project, click Properties, and in the dialog you can set the source location and JavaDoc location for the JAR file.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Meshulam Silk
Greenhorn

Joined: Feb 12, 2012
Posts: 22
Jesper de Jong wrote:That comment in front of the method is not an annotation. Annotations are something completely different, you were confusing Ulf by calling this an annotation. That comment is a JavaDoc comment. With the JavaDoc tool you can convert this to a set of HTML pages that contain API documentation, in the same way as the API documentation for the standard Java library.

If you're using Eclipse, and you've added a JAR file as a library to your project, then you can attach sources and JavaDoc to the JAR file. Right-click the JAR file in the list of dependencies of the project, click Properties, and in the dialog you can set the source location and JavaDoc location for the JAR file.


Oh ok I couldn't find the actual name and annotation seemed close enough. Thanks.
So I figured out how to export the JavaDoc from the pre-jarred project and add it to the imported jar in the new project like you said and now it works!
But, is there a way for the JavaDoc to be automatically attached to the jar (so I won't have to do this every time I import the jar)?

Either way, thanks for the help!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JavaDoc not showing up
 
Similar Threads
Using a directory inside of a JAR file
Setting an Entry Point with JAR Tool
adding a .jar file to a project in eclipse 3.2
Extremly urgent... Blob compression
Target Unreachable, identifier 'subjectsListController' resolved to null