idea fetching documentation解决

使用idea的某天突然发现鼠标放在方法名上时无法获取到javadoc,悬浮框里一致显示fetching documentation… 最后发现了原因是javadoc的获取来源指定了oracle的地址,可以通过以下方法解决:
首先找到 用户目录.IntelliJIdea2016.2\config\options\jdk.table.xml 这个文件打开


  "ProjectJdkTable">
    "2">
      value="1.8" />
      <type value="JavaSDK" />
      value="java version "1.8.0_20"" />
      value="D:/zhao/jdk" />
      
        
          type="composite">
            type="simple" url="jar://$APPLICATION_HOME_DIR$/lib/jdkAnnotations.jar!/" />
          
        
        
          type="composite">
            type="simple" url="jar://D:/zhao/jdk/jre/lib/charsets.jar!/" />
            type="simple" url="jar://D:/zhao/jdk/jre/lib/deploy.jar!/" />
            type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/access-bridge-64.jar!/" />
            type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/cldrdata.jar!/" />
            type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/dnsns.jar!/" />
            type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/jaccess.jar!/" />
            type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/jfxrt.jar!/" />
            type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/localedata.jar!/" />
            type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/nashorn.jar!/" />
            type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/sunec.jar!/" />
            type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/sunjce_provider.jar!/" />
            type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/sunmscapi.jar!/" />
            type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/sunpkcs11.jar!/" />
            type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/zipfs.jar!/" />
            type="simple" url="jar://D:/zhao/jdk/jre/lib/javaws.jar!/" />
            type="simple" url="jar://D:/zhao/jdk/jre/lib/jce.jar!/" />
            type="simple" url="jar://D:/zhao/jdk/jre/lib/jfr.jar!/" />
            type="simple" url="jar://D:/zhao/jdk/jre/lib/jfxswt.jar!/" />
            type="simple" url="jar://D:/zhao/jdk/jre/lib/jsse.jar!/" />
            type="simple" url="jar://D:/zhao/jdk/jre/lib/management-agent.jar!/" />
            type="simple" url="jar://D:/zhao/jdk/jre/lib/plugin.jar!/" />
            type="simple" url="jar://D:/zhao/jdk/jre/lib/resources.jar!/" />
            type="simple" url="jar://D:/zhao/jdk/jre/lib/rt.jar!/" />
          
        
        
          type="composite" />
        
        
          type="composite">
            type="simple" url="jar://D:/zhao/jdk/src.zip!/" />
            type="simple" url="jar://D:/zhao/jdk/javafx-src.zip!/" />
          
        
      
      
    
    "2">
      value="1.7" />
      <type value="JavaSDK" />
      value="java version "1.7.0_45"" />
      value="D:/zhao/java/jdk1.7.0_45" />
      
        
          type="composite">
            type="simple" url="jar://$APPLICATION_HOME_DIR$/lib/jdkAnnotations.jar!/" />
          
        
        
          type="composite">
            type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/charsets.jar!/" />
            type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/deploy.jar!/" />
            type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/ext/access-bridge.jar!/" />
            type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/ext/dnsns.jar!/" />
            type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/ext/jaccess.jar!/" />
            type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/ext/localedata.jar!/" />
            type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/ext/sunec.jar!/" />
            type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/ext/sunjce_provider.jar!/" />
            type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/ext/sunmscapi.jar!/" />
            type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/ext/sunpkcs11.jar!/" />
            type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/ext/zipfs.jar!/" />
            type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/javaws.jar!/" />
            type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/jce.jar!/" />
            type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/jfr.jar!/" />
            type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/jfxrt.jar!/" />
            type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/jsse.jar!/" />
            type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/management-agent.jar!/" />
            type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/plugin.jar!/" />
            type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/resources.jar!/" />
            type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/rt.jar!/" />
          
        
        
          type="composite">
            type="simple" url="http://docs.oracle.com/javafx/2/api/" />
          
        
        
          type="composite">
            type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/src.zip!/" />
          
        
      
      
    
  

这里我的环境装了2个jdk,仔细看可以发现1.7的版本下比1.8多了一行配置

<javadocPath>
          <root type="composite">
            <root type="simple" url="http://docs.oracle.com/javafx/2/api/" />
          root>
        javadocPath>

这个时候在使用1.7的jdk的情况下,如果你的网络有限制连不上oracle的网站,就会出现一直fetching documentation 的情况,我们只需要将 url所在的那一行删掉就能正常读取到本地的javadoc了。

你可能感兴趣的:(编辑器)