Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

  • jdk-6u45-windows-i586.exe
  • jdk-7u75-windows-i586.exe
  • jdk-8u20-windows-i586.exe
  • jdk-8u25-windows-i586.exe
  • jdk-8u31-windows-i586.exe
  • jdk-8u40-windows-i586.exe

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

like image 580
smwikipedia Avatar asked Mar 25 '15 14:03

smwikipedia


People also ask

How to extract src file from JDK installer?

Extract src.zip from JDK Installer 1 Download the JDK. Visit this link to download the appropriate JDK for your Windows (32 or 64 bits), accepting Oracle’s... 2 Run the Installer, but stop right away!. 3 Extraction. Open the file ss180121.cab and copy the src.zip to a safe location, because the cab files are going to... 4 References. More ...

How to find the right file on the next JDK Release?

These files contains the following resources, pay attention to their prefixes to help you finding the right file on the next JDK releases: 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.

How to get SRC folder from Java 8u172 without installing?

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

How do I change the source code of a JDK?

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) ;) Share Improve this answer Follow answered Apr 28 '19 at 20:10


3 Answers

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"
like image 177
Jean-François Savard Avatar answered Oct 19 '22 10:10

Jean-François Savard


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!

like image 37
S Kumar Avatar answered Oct 19 '22 10:10

S Kumar


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

like image 28
matrixanomaly Avatar answered Oct 19 '22 10:10

matrixanomaly