MrGraversen MrGraversen - 5 months ago 19
Java Question

Eclipse cannot load javadoc ("Unknown javadoc format for <class name>")

The exception Eclipse is raising every time I try to load javadoc (in this case, for the

String
class) from the Java library is pasted below. However, if I try to hover-to-load javadoc I've written myself, it works fine!

This issue sort-of became a reality overnight, so I'm quite flabbergasted - one might say - as to why it is happening.


Java Model Exception: Java Model Status [Unknown javadoc format for
String {key=Ljava/lang/String;} [in String.class [in java.lang [in
C:\Program Files (x86)\Java\jre7\lib\rt.jar]]]] at
org.eclipse.jdt.internal.core.JavadocContents.getTypeDoc(JavadocContents.java:81)
at
org.eclipse.jdt.internal.core.BinaryType.getAttachedJavadoc(BinaryType.java:999)
at
org.eclipse.jdt.internal.ui.text.javadoc.JavadocContentAccess2.getHTMLContent(JavadocContentAccess2.java:500)
at
org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getHoverInfo(JavadocHover.java:689)
at
org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.internalGetHoverInfo(JavadocHover.java:607)
at
org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getHoverInfo2(JavadocHover.java:599)
at
org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:163)
at
org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:129)
at
org.eclipse.jdt.internal.ui.text.java.hover.JavaEditorTextHoverProxy.getHoverInfo2(JavaEditorTextHoverProxy.java:85)
at
org.eclipse.jface.text.TextViewerHoverManager$4.run(TextViewerHoverManager.java:166)
!SUBENTRY 1 org.eclipse.jdt.core 4 1009 2014-11-17 17:08:21.592
!MESSAGE Unknown javadoc format for String {key=Ljava/lang/String;}
[in String.class [in java.lang [in C:\Program Files
(x86)\Java\jre7\lib\rt.jar]]] !SESSION 2014-11-17 17:08:41.946


I've tried:



None of it works.

Answer

Go to:

 Window -> Preferences -> Java -> Installed JREs

Removing the reference to the JRE and add JDK instead.