本文主要是介绍idea fetching documentation解决,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
使用idea的某天突然发现鼠标放在方法名上时无法获取到javadoc,悬浮框里一致显示fetching documentation… 最后发现了原因是javadoc的获取来源指定了oracle的地址,可以通过以下方法解决:
首先找到 用户目录.IntelliJIdea2016.2\config\options\jdk.table.xml 这个文件打开
<application><component name="ProjectJdkTable"><jdk version="2"><name value="1.8" /><type value="JavaSDK" /><version value="java version "1.8.0_20"" /><homePath value="D:/zhao/jdk" /><roots><annotationsPath><root type="composite"><root type="simple" url="jar://$APPLICATION_HOME_DIR$/lib/jdkAnnotations.jar!/" /></root></annotationsPath><classPath><root type="composite"><root type="simple" url="jar://D:/zhao/jdk/jre/lib/charsets.jar!/" /><root type="simple" url="jar://D:/zhao/jdk/jre/lib/deploy.jar!/" /><root type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/access-bridge-64.jar!/" /><root type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/cldrdata.jar!/" /><root type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/dnsns.jar!/" /><root type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/jaccess.jar!/" /><root type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/jfxrt.jar!/" /><root type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/localedata.jar!/" /><root type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/nashorn.jar!/" /><root type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/sunec.jar!/" /><root type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/sunjce_provider.jar!/" /><root type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/sunmscapi.jar!/" /><root type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/sunpkcs11.jar!/" /><root type="simple" url="jar://D:/zhao/jdk/jre/lib/ext/zipfs.jar!/" /><root type="simple" url="jar://D:/zhao/jdk/jre/lib/javaws.jar!/" /><root type="simple" url="jar://D:/zhao/jdk/jre/lib/jce.jar!/" /><root type="simple" url="jar://D:/zhao/jdk/jre/lib/jfr.jar!/" /><root type="simple" url="jar://D:/zhao/jdk/jre/lib/jfxswt.jar!/" /><root type="simple" url="jar://D:/zhao/jdk/jre/lib/jsse.jar!/" /><root type="simple" url="jar://D:/zhao/jdk/jre/lib/management-agent.jar!/" /><root type="simple" url="jar://D:/zhao/jdk/jre/lib/plugin.jar!/" /><root type="simple" url="jar://D:/zhao/jdk/jre/lib/resources.jar!/" /><root type="simple" url="jar://D:/zhao/jdk/jre/lib/rt.jar!/" /></root></classPath><javadocPath><root type="composite" /></javadocPath><sourcePath><root type="composite"><root type="simple" url="jar://D:/zhao/jdk/src.zip!/" /><root type="simple" url="jar://D:/zhao/jdk/javafx-src.zip!/" /></root></sourcePath></roots><additional /></jdk><jdk version="2"><name value="1.7" /><type value="JavaSDK" /><version value="java version "1.7.0_45"" /><homePath value="D:/zhao/java/jdk1.7.0_45" /><roots><annotationsPath><root type="composite"><root type="simple" url="jar://$APPLICATION_HOME_DIR$/lib/jdkAnnotations.jar!/" /></root></annotationsPath><classPath><root type="composite"><root type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/charsets.jar!/" /><root type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/deploy.jar!/" /><root type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/ext/access-bridge.jar!/" /><root type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/ext/dnsns.jar!/" /><root type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/ext/jaccess.jar!/" /><root type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/ext/localedata.jar!/" /><root type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/ext/sunec.jar!/" /><root type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/ext/sunjce_provider.jar!/" /><root type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/ext/sunmscapi.jar!/" /><root type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/ext/sunpkcs11.jar!/" /><root type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/ext/zipfs.jar!/" /><root type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/javaws.jar!/" /><root type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/jce.jar!/" /><root type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/jfr.jar!/" /><root type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/jfxrt.jar!/" /><root type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/jsse.jar!/" /><root type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/management-agent.jar!/" /><root type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/plugin.jar!/" /><root type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/resources.jar!/" /><root type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/jre/lib/rt.jar!/" /></root></classPath><javadocPath><root type="composite"><root type="simple" url="http://docs.oracle.com/javafx/2/api/" /></root></javadocPath><sourcePath><root type="composite"><root type="simple" url="jar://D:/zhao/java/jdk1.7.0_45/src.zip!/" /></root></sourcePath></roots><additional /></jdk></component>
</application>
这里我的环境装了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了。
这篇关于idea fetching documentation解决的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!