No "src.zip" when extracting JDK installer

I followed this procedure: How can I get the latest JRE / JDK as a zip file, not an EXE or MSI? . To get JDK without administrator privileges. However, I am still skipping the original src.zip archive.

When I open the installer with 7-Zip, it only shows the "tools.zip" file. Here is the command line output:

C:\Users\mlogan\Downloads>7z.exe l jdk-7u45-windows-i586.exe 7-Zip 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18 Listing archive: jdk-7u45-windows-i586.exe -- Path = jdk-7u45-windows-i586.exe Type = PE CPU = x86 Characteristics = Executable 32-bit Created = 2013-10-08 17:03:06 Physical Size = 129487776 Headers Size = 1024 Checksum = 129505985 Image Size = 129503232 Section Alignment = 4096 File Alignment = 512 Code Size = 62976 Initialized Data Size = 129425408 Uninitialized Data Size = 0 Linker Version = 10.0 OS Version = 5.1 Image Version = 0.0 Subsystem Version = 5.1 Subsystem = Windows GUI DLL Characteristics = Relocated NX-Compatible TerminalServerAware Stack Reserve = 1048576 Stack Commit = 4096 Heap Reserve = 1048576 Heap Commit = 4096 Image Base = 4194304 ---- Path = .rsrc\JAVA_CAB10\111 Size = 83877914 Packed Size = 83877914 -- Path = .rsrc\JAVA_CAB10\111 Type = Cab Method = LZX Blocks = 1 Volumes = 1 Date Time Attr Size Compressed Name ------------------- ----- ------------ ------------ ------------------------ 2013-10-08 08:42:32 ....A 181321555 tools.zip ------------------- ----- ------------ ------------ ------------------------ 181321555 129487776 1 files, 0 folders 

Do you have any ideas on how to get the source archive?

+6
source share
3 answers

As @PeterLawrey suggested, the best way is to use a Linux distribution.

+1
source

According to Pierrot Ottuzzi's latest answer to his post http://www.brucalipto.org/java/how-to-create-a-portable-jdk-1-dot-8-on-windows , Oracle seems to no longer include src .zip from update 45. You can always use tools.zip to have a portable JDK.

Steps to follow Windows to have a portable JDK:

  • Download the installer, for example. jdk-8u51-windows-x64.exe, in a folder, for example. "downloads" containing 7z.exe.

  • Extract tools.zip from the installer using 7-Zip: open a command prompt and enter

     D:\downloads>7z x jdk-8u51-windows-x64.exe 
  • Extract the contents of tools.zip to a folder, say "jdk", using 7-Zip: at a command prompt

     D:\downloads>7z x tools.zip -ojdk 
  • Navigate to the jdk folder and convert the .pack files to .jar files: enter the command line

     D:\downloads>cd jdk D:\downloads\jdk>for /r %x in (*.pack) do .\bin\unpack200 -r "%x" "%~dx%~px%~nx.jar" 

The jdk folder is the required portable jdk. To test it, at a command prompt, type:

 D:\downloads\jdk>.\bin\java -version 

You'll get

 java version "1.8.0_51" Java(TM) SE Runtime Environment (build 1.8.0_51-b16) Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode) 
+2
source

You can extract src.zip by following these steps.

Note. The steps are mentioned for jdk-7u80-windows-x64.exe . The steps for JDK7 and JDK8 (for 32-bit and 64-bit) are similar.

Step 1

Run the standalone installer jdk-7u80-windows-x64.exe . The setup screen is displayed. Do not click Next .

enter image description here

Step 2

Now in the file explorer go to the directory

 C:\Users\UserName\AppData\LocalLow\Sun\Java 

where UserName is replaced with the actual username.

Note. . For JDK 8, use the directory

 C:\Users\UserName\AppData\LocalLow\Oracle\Java 

enter image description here

Now the MSI and CAB files for the 64-bit installation of JDK 7u80 will be located in the jdk1.7.0_80_x64 directory.

Note. . For a 32-bit installation of JDK 7u80, the corresponding directory will be jdk1.7.0_80 .

Step 3

Copy this folder to another suitable location. Now cancel the JDK installation.

Step 4

Now in the copied folder you will find the following files:

  • jdk1.7.0_80.msi - MSI to install the JDK.
  • sj170800.cab - Contains the files necessary for self-installing JRE.
  • ss170800.cab - contains the src.zip file.
  • st170800.cab - contains the tools.zip file.
  • sz170800.cab - contains the COPYRIGHT file.
+1
source

Source: https://habr.com/ru/post/957333/


All Articles