Extract src.zip from JDK Installer

Since Oracle stopped shipping src.zip inside of tools.zip on the release 45 of JDK 8, this tutorial will show you how to extract src.zip from JDK installer.

Download the JDK

Visit this link to download the appropriate JDK for your Windows (32 or 64 bits), accepting Oracle’s license agreement.
在这里插入图片描述

Run the Installer, but stop right away!

Once you’ve downloaded the installer, execute it and wait until the welcome page is presented, don’t click on Next or not even close it:
JDK installation welcome page

Extraction

Whilst you keep the welcome page opened, go to the C:\Users\AppData\LocalLow\Oracle\Java, replacing <youruser> by your current Windows’ user, for example C:\Users\bruno.gasparotto\AppData\LocalLow\Oracle, then you might see something like the following:
Inside of LocalRow Java folder

Go to the JDK folder then you might see the following files:
在这里插入图片描述

These files contains the following resources, pay attention to their prefixes to help you finding the right file on the next JDK releases:

  • jdk1.8.0_12164.msi: the MSI installer
  • sj180121.cab: the JRE runnable
  • ss180121.cab: the src.zip we are looking for
  • st180121.cab: the tools.zip we can extract the JDK from
  • sz180121.cab: the COPYRIGHT file

Open the file ss180121.cab and copy the src.zip to a safe location, because the cab files are going to vanish when you close the installer.
src.zip file inside of LocalRow ss180121.cab file

Finally, with the src.zip file saved somewhere safe, close the installer you opened at the beginning of this tutorial.

Hope it helps. Cya!

Some JDK download links

JDK8
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

JDK7
https://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html

JDK6
https://www.oracle.com/technetwork/java/javase/java-archive-downloads-javase6-419409.html

JDK5
https://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase5-419410.html

参考文章:
https://bgasparotto.com/extract-src-zip-jdk-installer

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值