Pages

Monday, May 28, 2018

Create Java Pre installed zip from Jdk executable


Creating a pre installed JDK in Zip package, Follow these steps:
  1. Download Latest Jdk executable from Oracle.com
  2. extract all the files from jdk-8u172-windows-x64.exe into the directory( any destination dir)
    Eg: C:\JDK
  3. Execute the following commands in cmd.exe:
    • cd C:\JDK\.rsrc\1033\JAVA_CAB10
    • extrac32 111
  4. Unpack C:\JDK\.rsrc\1033\JAVA_CAB10\tools.zip with 7-zip
  5. Execute the following commands in cmd.exe:
    • cd C:\JDK\.rsrc\1033\JAVA_CAB10\tools\
    • for /r %x in (*.pack) do .\bin\unpack200 -r "%x" "%~dx%~px%~nx.jar" (this will convert all .pack files into .jar files)
  6. Copy all contents of C:\JDK\.rsrc\1033\JAVA_CAB10\tools where you want your JDK to be