Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get Oracle Java 1.8 in windows without installing it

Tags:

java

windows

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 it and start using it in my Windows machine (64-bit processor)?

like image 952
user1346316 Avatar asked Nov 19 '14 09:11

user1346316


People also ask

Can we use Java without installation?

If you want to run any Java program on your Windows PC, you won't be able to do it without installing the Java Development Kit (JDK for short). The JDK also contains the Java Runtime Environment (or JRE) which is the core of a Java program.

Can we use JDK without installation?

Comments. Just to answer my own question after finally being able to experiment: yes, you can use the JDK without installing it.

How do I download JDK 1.8 for free?

Sign in using your Oracle account (or create a new one) and the download should start. Once the download is complete, locate the jdk-8u172-windows-x64.exe file and double-click to run the installer. Click Next and on the following screen optionally change the installation location by clicking on the Change... button.


2 Answers

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

like image 50
Karthikeyan Vaithilingam Avatar answered Oct 18 '22 20:10

Karthikeyan Vaithilingam


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.

like image 35
Darrel Lee Avatar answered Oct 18 '22 22:10

Darrel Lee