smwikipedia
smwikipedia

Reputation: 64175

Where is the src.zip for JDK8u40?

I installed the JDK8u40, but only find the javafx-src.zip.

Where can I find the source code for JDK? The src.zip?

Below is what I get after installation:

And btw, I didn't see the installation wizard! This is quite strange.

enter image description here

ADD 1

Today I tried several Java installation packages. All are downloaded from Oracle official site.

Both 6u45 and 7u75 installed well on my box. I can see the install wizard. And the src.zip is installed.

But 8u25 ~ 8u40 all installed silently. And no src.zip file is installed because I have no chance to select it in the wizard.

I am not sure if this is my fault or someone at Oracle made a mistake.

As @SubOptimal commented, the /s option indicates a silent install. I am wondering if there's an option to force the GUI install wizard to open.

I am using Windows 7 Enterprise x64 Build 7601 SP1

Upvotes: 22

Views: 30969

Answers (6)

chill appreciator
chill appreciator

Reputation: 422

  1. Download the JDK
  2. Run the Installer, but stop right away
  3. Extract src.zip from C:\Users\<your_username>\AppData\LocalLow\Oracle\ss180121.cab

You can extract .zip from .cab with tool like 7Zip

Taken from

Upvotes: 0

Mr.Q
Mr.Q

Reputation: 4524

if you JDK installer silently skips installing the source. just open the control panel > programs an features and find Java. Right click on it and select change and then select the source (option) ;)

enter image description here

Upvotes: 0

S Kumar
S Kumar

Reputation: 595

This is the way I got the src folder from jdk-8u172-windows-x64.exe file without installing.

Step1: Download jdk-8u172-windows-x64.exe file (Java SE Development Kit 8u172) from oracle site

Step2: Extract it and navigate to the path: \jdk-8u172-windows-x64.rsrc\1033\JAVA_CAB9

Step3: Right click on file named "110" and extract it.

You will get the src.zip file.

It took me little while to figure this out. I hope it will help others.

Enjoy debugging Good Code!

Upvotes: 20

matrixanomaly
matrixanomaly

Reputation: 6947

I don't know why/where the src.zip is, but as an alternative, if all you want is the source and somehow the proposed method doesn't work for you, you could always pull directly from the JDK8u40 source tree.

You will need Mercurial instead of Git. This link talks about the hg clone command

Quoting from the OpenJDK Java.net site

The corresponding master forest jdk8u can be cloned using this command: hg clone http://hg.openjdk.java.net/jdk8u/jdk8u;cd jdk8u;sh get_source.sh .

In addition, the source code for the last release, 8u40, is available by cloning the 8u40 master forest : http://hg.openjdk.java.net/jdk8u/jdk8u40. The final build of that release was tagged as jdk8u40-b25.

There are differences between OpenJDK and Oracle's, though subtle

Upvotes: 2

gujralam
gujralam

Reputation: 307

download JDK 8 from following link

http://www.oracle.com/technetwork/java/javase/jdk-8-readme-2095712.html

src.zip comes in-built with it

Upvotes: 0

Jean-Fran&#231;ois Savard
Jean-Fran&#231;ois Savard

Reputation: 21004

Make sure the Source code is not disabled when downloading.

enter image description here

Then as you can see on the picture, selecting "Source Code" will tell you exactly where it is located.

enter image description here

Notice that I've downloaded the 32 bits version to make sure to reproduce the same use case as you.


Edit

As per your new edits and comments, it seems what you want to know now is why you don't see the installation wizards. I'm pretty sure this is due to old-set registry key.

Run the following command

reg query hklm\software\microsoft\windows\currentversion\installer\UserData\S-1-5-18\Products /f "java" /s | find "HKEY_LOCAL_MACHINE"

Now, navigate to each of the returned path browsing with regedit and delete their entire parent (the big hexa number).

Re-try the installation and I'm pretty sure you will see the wizard.


As for the sources, Oracle documentation specify how to download them in silent mode.

jdk.exe /s ADDLOCAL="SourceFeature"

Upvotes: 21

Related Questions