Search This Blog

Tuesday, October 18, 2016

Installing Java JDK - example latest JDK7 version.

Just some notes on installing JDKs

Download the JDKs from Oracle Support:
Search on document 1439822.1 and find the version you wish to install.
Do not use the MSI Installers.  Be sure to download the version for your architecture.

For Windows versions you will download a zip file
For example for JDK 1.7.0_111 the windows file is: p24558841_170111_MSWIN-x86-64.zip
For Linux versions you will also download a zip file
For example for JDK 1.7.0_111 the Linux file is: p24558841_170111_Linux-x86-64.zip

For both windows or linux installs, start on your PC and unzip the zip file to a folder - usually the same as the filename (if you are using 7-Zip).  You will find inside objects for JDK and objects for JRE.

For windows JDK1.7.0_111 you will see the following:
jdk-7u111-windows-x64.exe
jre-7u111-windows-x64.exe
readme.txt
server-jre-7u111-windows-x64.tar.gz

I always use the JDK version.  When I install on Windows I always install onto the C:\Java folder so I will get C:\Java\jdk1.7.0_111 folder as my JAVA_HOME.  I don't ever install the public JRE.  To download the browser JRE always go to java.com and do it from there.

For Linux, the folder expands to:
jdk-7u111-linux-x64.rpm
jdk-7u111-linux-x64.tar.gz
jre-7u111-linux-x64.rpm
jre-7u111-linux-x64.tar.gz
readme.txt
server-jre-7u111-linux-x64.tar.gz

Some versions are .gz and not .tar.gz.  For all versions use the .tar.gz install, I always use the JDK version:

Change directory to the place where you want to create JAVA_HOME and use:
$ tar xvzf jdk-7u111-linux-x64.tar.gz
The folder will be created with all of the associated assets

To install the JCE Unlimited Strength download them from the oracle site (search on JCE 1.7) and download to your box.  The file name is UnlimitedJCEPolicyJDK7.zip

Then cd to $JAVA_HOME/jre/lib/security and type

$ unzip -j <path-to-your-file>/UnlimitedJCEPolicyJDK7.zip

That should do it.