Get Oracle Java 1.8 in windows without installing it

前端 未结 5 595
谎友^
谎友^ 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 12:43

    I was looking for a solution to this as well. I'm not sure why the OP wanted to do this. I'm just trying to get a newer version of java for new development while not interfering with an older Java install which a legacy application requires (I'd like to update the legacy app, but it's not an option, now)

    I think the hack I am going to try is this:

    1. Install 1.8
    2. Take a copy of the install folder
    3. Uninstall 1.8
    4. Reinstall / Repair 1.7
    5. restore the copy of 1.

    I'm sure if I had a better understanding of what the install is doing, this would not be necessary.

    0 讨论(0)
  • 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

    0 讨论(0)
  • 2021-02-04 13:01

    If you do not have permission to unzip zip file then you cannot install java . As java does not need installation for running . You just need to give path of java.exe where it is located .

    In Windows it is located in C:\Program Files\Java\jdk1.8.0_05\bin For a solution you can run installer on any machine that you have permission and just copy and paste the folder of java to anywhere in your system (Machine where you have administrative rights problem) . and just set the path as by opening command prompt as set path="C:\Program Files\Java\jdk1.8.0_05\bin" java will be working as you want

    0 讨论(0)
  • 2021-02-04 13:09

    I had a spare virtual machine hanging around (if not you could build one or maybe even download one) so I:

    • installed the Oracle JDK in the guest
    • copied the jdk folder from the guest to the host
    • added a JAVA_HOME environment variable.

    The operating systems obviously have to be close (not sure how close, I used Windows Server 2008 64 bit guest on a Windows 10 64 bit host and it seemed to work).

    Was a quick fix for me as I didn't want a full install and wanted to remove it afterwards.

    0 讨论(0)
  • 2021-02-04 13:09

    The following worked for me (I had JDK 1.8 installed and needed the 32 bit version as well):

    • Verify the current version with java -version
    • Assuming a different version (minor or major is being installed), download the relevant JDK installable from Oracle and run it. In the first dialog, specify a different folder than the default location (might work with the default one as well), then select Next. It will extract the files there in this folder, then it will asl for the folder where the JRE is to be installed. Simply close the installer, now you should have just the JDK in the specified folder.
    • Rerun java -version, it should give you the same version as earlier.
    • Worst case, if it shows the newer version, go to your system path (Right click My Computer (or This PC) -> Properties -> Advanced system settings -> Advanced tab -> click on Environment variables button) and remove the Oracle javapath entry (From the Path variable in the bottom part of the window). The add the older java version's bin folder to the path variable in the beginning.
    0 讨论(0)
提交回复
热议问题