Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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:

  • Updating eclipse
  • Switching workspace
  • Reinstalling java
  • The settings appear to be configured correctly (I validated the settings in eclipse, and it was a-OK)

None of it works.

like image 319
MrGraversen Avatar asked Sep 30 '22 09:09

MrGraversen


2 Answers

Go to:

 Window -> Preferences -> Java -> Installed JREs

Removing the reference to the JRE and add JDK instead.

like image 163
Mohammed Ali Avatar answered Oct 19 '22 09:10

Mohammed Ali


Update: I am working on an Android Application. I fixed my problem by right-clicking on my project in the explorer->properties->java build path->libraries->android 4.2.2->android.jar->javadoc location and just changing it from http://developer.android.com/reference/ to https://developer.android.com/reference/ (just adding HTTPS). I just did this for one project and it seems like all other projects work now, too.

Mohammed Ali, your answer does not seem to help me. I tried deleting references to the JRE, adding the SDK and restarting eclipse, but it did not help. I tried putting the JRE back, and it's not helping, either. The exception is the following:

Java Model Exception: Java Model Status [Unknown javadoc format for Activity {key=Landroid/app/Activity;} [in Activity.class [in android.app [in E:\AndroidSDK\platforms\android-17\android.jar]]]]
    at org.eclipse.jdt.internal.core.JavadocContents.getTypeDoc(JavadocContents.java:77)
    at org.eclipse.jdt.internal.core.BinaryType.getAttachedJavadoc(BinaryType.java:997)
    at org.eclipse.jdt.internal.ui.text.javadoc.JavadocContentAccess2.getHTMLContent(JavadocContentAccess2.java:462)
    at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getHoverInfo(JavadocHover.java:621)
    at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.internalGetHoverInfo(JavadocHover.java:567)
    at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getHoverInfo2(JavadocHover.java:559)
    at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:142)
    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)
like image 25
Stewpid Software Avatar answered Oct 19 '22 10:10

Stewpid Software