Home > Net >  why does eclipse show an error message when using the javadoc tag @param when commenting?
why does eclipse show an error message when using the javadoc tag @param when commenting?

Time:02-04

I was typing some code in eclipse and as soon as I start to use the javadoc @param tag the IDE show me an error mark as seen in the picture. When I use the given solution from eclipse, the IDE corrects for example @param board to @paramboard but this is not the correct notation as I know. The javadoc tag @see don't show such error as seen in the picture. Do I miss some setting here or do I mistaken here something?

Thanks in advance! Screenshot of my IDE with the error mark

CodePudding user response:

Try opening your Javadoc comment block with /** instead of /*:

Example:

https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html

/**
* Returns an Image object that can then be painted on the screen. 
* The url argument must specify an absolute <a href="#{@link}">{@link URL}</a>. The name
* argument is a specifier that is relative to the url argument. 
* <p>
* This method always returns immediately, whether or not the 
* image exists. When this applet attempts to draw the image on
* the screen, the data will be loaded. The graphics primitives 
* that draw the image will incrementally paint on the screen. 
*
* @param  url  an absolute URL giving the base location of the image
* @param  name the location of the image, relative to the url argument
* @return      the image at the specified URL
* @see         Image
*/
public Image getImage(URL url, String name) {
  try {
    return getImage(new URL(url, name));
  } 
  catch (MalformedURLException e) {
    return null;
  }
}
  • Related