Get Oracle Java 1.8 in windows without installing it

前端 未结 5 589
谎友^
谎友^ 2021-02-04 12:17

Is it possible to get Java in zip format? I don\'t want to install it by getting .exe file.

Is there any zip version of Java 1.8 so that I can download it and extract i

5条回答
  •  北荒
    北荒 (楼主)
    2021-02-04 13:01

    You can extract the JDK folder from the Installation EXE.

    Check this link for the steps. The post was for JDK 1.7 it will work for JDK 1.8 also

    Do the following.

    Steps

    1. Download JDK from Oracle
    2. Download and Install 7-zip from here
    3. Open installition exe using 7-Zip
    4. Extract the tools.zip
    5. Extract the content of tools.zip to a folder (e.g. c:\jdk).
    6. Open the extracted folder in cmd prompt.
    7. Execute for /r %x in (*.pack) do .\bin\unpack200 -r "%x" "%~dx%~px%~nx.jar" command
    8. Set JAVA_HOME to the jdk (e.g c:\jdk) folder.
    9. Add %JAVA_HOME%/bin to the PATH env variable.

    Testing

    Run the following command to check the installation, it will print the version of JDK.

    c:> javac -version
    javac 1.7.0_51
    

    NOTE: Tested with JDK 1.7 and 1.8

    Update 1

    Edited the answer to add the steps in the answer itself instead of the link to a blog post.

    Update 2

    For 64-Bit please check unpack-jdk-x64.bat by grabantot

提交回复
热议问题