{"id":324,"date":"2005-03-28T04:00:00","date_gmt":"2005-03-27T19:00:00","guid":{"rendered":"https:\/\/ecoop.net\/memo\/2005-03-28-4.html"},"modified":"2026-08-10T14:34:14","modified_gmt":"2026-08-10T05:34:14","slug":"2005-03-28-4","status":"publish","type":"post","link":"https:\/\/www.ecoop.net\/memo\/archives\/2005-03-28-4.html","title":{"rendered":"JDK1.5 \u306e javadoc \u3067 package.html \u3092\u6307\u5b9a\u3059\u308b\u3068\u8907\u6570\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u30b3\u30e1\u30f3\u30c8\u306e\u30bd\u30fc\u30b9\u3068\u8a00\u308f\u308c\u3066\u8b66\u544a\u306b\u306a\u308b"},"content":{"rendered":"<p>\n&#8211; \u6b63\u3057\u304f\u51fa\u529b\u3055\u308c\u308b\u306e\u3067\u5bb3\u306f\u306a\u3044\u3082\u306e\u306e\u3001\u6bce\u56de\u8b66\u544a\u304c\u3067\u3066\u3044\u305f\u306e\u3067\u8abf\u3079\u3066\u307f\u305f\u3002\u8b66\u544a\u5185\u5bb9\u306f\u6b21\u306e\u901a\u308a\u3002<\/p>\n<blockquote><p>javadoc: \u8b66\u544a &#8211; \u30d1\u30c3\u30b1\u30fc\u30b8 &#8220;x.y.z&#8221; \u306b\u8907\u6570\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u30b3\u30e1\u30f3\u30c8\u306e\u30bd\u30fc\u30b9\u304c\u691c\u51fa\u3055\u308c\u307e\u3057\u305f\u3002\n<\/p><\/blockquote>\n<p>\u82f1\u8a9e\u3060\u3068\u4ee5\u4e0b\u3002\n<\/p>\n<blockquote><p>Multiple sources of package comments found for package &#8220;x.y.z&#8221;\n<\/p><\/blockquote>\n<p>Java Forums &lt;http:\/\/forum.java.sun.com\/thread.jspa?threadID=599721&amp;tstart=0> \u306b\u305a\u3070\u308a\u56de\u7b54\u304c\u3002\n<\/p>\n<blockquote><p>Yep. The Doclet interface of the Doclet API specifies a method<br \/>\n&nbsp;<br \/>\nvoid setRawCommentText(String text)<br \/>\n&nbsp;<br \/>\nprior to 1.5 this method did exactly what its name implies. With 1.5 the implementation was changed to generate a warning and do nothing if it was attempted to set the comment text multiple times.<br \/>\nWhat happens is this:<br \/>\nJavadoc sees the package.html files in the sources, creates an appropriate Doc (PackageDoc) instance and sets the comment text. Then for some reason Javadoc encounters package.html files for already existing Doc instances and tries to set the comment text a second (third, fourth, &#8230;) time.<br \/>\nSo, all you need to do is to ensure that Javadoc parses the package.html file for a given package only once, i.e. ensure that only sourcepath points to the package.html files but not classpath.\n<\/p><\/blockquote>\n<p>1.5 \u304b\u3089 package.html \u304c\u8907\u6570\u898b\u4ed8\u304b\u3063\u305f\u6642\u306b\u4e0a\u66f8\u304d\u3057\u3064\u3064\u3001\u8b66\u544a\u3092\u51fa\u3059\u3088\u3046\u306b\u306a\u3063\u305f\u3068\u306e\u3053\u3068\u3002<br \/>\n\u3053\u3053\u3067\u4f8b\u306b\u3042\u308b\u3068\u304a\u308a\u3001 javadoc \u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3001 sourcepath \u3067\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u3042\u308b\u5834\u6240\u3092\u793a\u3057\u3064\u3064\u3001\u306a\u304a\u304b\u3064 classpath \u3067\u3082\u793a\u3057\u3066\u3044\u305f\u306e\u304c\u539f\u56e0\u3060\u3063\u305f\u3002Eclipse \u3067\u306f\u30ea\u30ea\u30fc\u30b9\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u3082 package.html \u3092\u30b3\u30d4\u30fc\u3057\u3066\u304f\u308c\u3066\u3044\u3066\u3001\u7d50\u5c40\u305d\u308c\u304c source \u306e\u3082\u306e\u3068\u91cd\u8907\u3057\u3066\u3057\u307e\u3063\u305f\u3002<br \/>\n&nbsp;<br \/>\n\u305d\u3082\u305d\u3082\u4e0d\u8981\u306a\u3001classpath \u304b\u3089\u30ea\u30ea\u30fc\u30b9\u30c7\u30a3\u30ec\u30af\u30c8\u30ea(bin)\u306e\u6307\u5b9a\u3092\u5916\u3057\u3066\u89e3\u6c7a\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8211; \u6b63\u3057\u304f\u51fa\u529b\u3055\u308c\u308b\u306e\u3067\u5bb3\u306f\u306a\u3044\u3082\u306e\u306e\u3001\u6bce\u56de\u8b66\u544a\u304c\u3067\u3066\u3044\u305f\u306e\u3067\u8abf\u3079\u3066\u307f\u305f\u3002\u8b66\u544a\u5185\u5bb9\u306f\u6b21\u306e\u901a\u308a\u3002 javadoc: \u8b66\u544a &#8211; \u30d1\u30c3\u30b1\u30fc\u30b8 &#8220;x.y.z&#8221; \u306b\u8907\u6570\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u30b3 &hellip; <a href=\"https:\/\/www.ecoop.net\/memo\/archives\/2005-03-28-4.html\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">JDK1.5 \u306e javadoc \u3067 package.html \u3092\u6307\u5b9a\u3059\u308b\u3068\u8907\u6570\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u30b3\u30e1\u30f3\u30c8\u306e\u30bd\u30fc\u30b9\u3068\u8a00\u308f\u308c\u3066\u8b66\u544a\u306b\u306a\u308b<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[141],"tags":[42],"class_list":["post-324","post","type-post","status-publish","format-standard","hentry","category-lifehack","tag-java"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts\/324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/comments?post=324"}],"version-history":[{"count":1,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts\/324\/revisions"}],"predecessor-version":[{"id":1500,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts\/324\/revisions\/1500"}],"wp:attachment":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/media?parent=324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/categories?post=324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/tags?post=324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}