IDEA刪除已經廢棄不用的jdk選項

康冕峰發表於2021-01-01

心態上,完美主義者會把那些成為過去的jdk解除安裝掉。但是IDEA是不會自動遺忘這些jdk版本,需要我們手動從XML文件裡自己暴力刪除即可。

1.顯示不美觀的jdk選項

2.IDEA2018、2019等版本的XML配置路徑

C:\Users\HASEE\.IntelliJIdea2019.3\config\options\jdk.table.xml

3.那些代表失效路徑jdk的<jdk>標籤,可以刪掉

jdk.table.xml

<application>
  <component name="ProjectJdkTable">
    <jdk version="2">
      <name value="1.8" />
      <type value="JavaSDK" />
      <version value="java version &quot;1.8.0_261&quot;" />
      <homePath value="D:/javaweb/Java/jdk1.8.0_261" />
      <roots>
        <annotationsPath>
          <root type="composite">
            <root url="jar://$APPLICATION_HOME_DIR$/plugins/java/lib/jdkAnnotations.jar!/" type="simple" />
          </root>
        </annotationsPath>
        <classPath>
          <root type="composite">
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/jre/lib/charsets.jar!/" type="simple" />
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/jre/lib/deploy.jar!/" type="simple" />
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/jre/lib/ext/access-bridge-64.jar!/" type="simple" />
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/jre/lib/ext/cldrdata.jar!/" type="simple" />
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/jre/lib/ext/dnsns.jar!/" type="simple" />
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/jre/lib/ext/jaccess.jar!/" type="simple" />
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/jre/lib/ext/jfxrt.jar!/" type="simple" />
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/jre/lib/ext/localedata.jar!/" type="simple" />
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/jre/lib/ext/nashorn.jar!/" type="simple" />
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/jre/lib/ext/sunec.jar!/" type="simple" />
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/jre/lib/ext/sunjce_provider.jar!/" type="simple" />
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/jre/lib/ext/sunmscapi.jar!/" type="simple" />
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/jre/lib/ext/sunpkcs11.jar!/" type="simple" />
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/jre/lib/ext/zipfs.jar!/" type="simple" />
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/jre/lib/javaws.jar!/" type="simple" />
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/jre/lib/jce.jar!/" type="simple" />
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/jre/lib/jfr.jar!/" type="simple" />
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/jre/lib/jfxswt.jar!/" type="simple" />
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/jre/lib/jsse.jar!/" type="simple" />
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/jre/lib/management-agent.jar!/" type="simple" />
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/jre/lib/plugin.jar!/" type="simple" />
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/jre/lib/resources.jar!/" type="simple" />
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/jre/lib/rt.jar!/" type="simple" />
          </root>
        </classPath>
        <javadocPath>
          <root type="composite" />
        </javadocPath>
        <sourcePath>
          <root type="composite">
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/src.zip!/" type="simple" />
            <root url="jar://D:/javaweb/Java/jdk1.8.0_261/javafx-src.zip!/" type="simple" />
          </root>
        </sourcePath>
      </roots>
      <additional />
    </jdk>
  </component>
</application>

 

相關文章