Installing java 8 – installing jdk version 8

The installation of Java 8 consists of four installation steps and is easy to perform.

For the development of Java applications, the current JDK (Java Development Kit) should always be installed. At the moment (as of April 2015) the JDK is available in version 8.

Notice: We have published a newer article on this topic, in which we show how to install OpenJDK 13 and how to install the Oracle JDK 13, the Oracle JDK 11 (LTS) and of the Oracle JDK 8 (LTS) on a Windows 10 PC. In addition, we have a large overview of the alternative Java distributions in the article How do I install Java?? summarized.

The installation of Java 8 consists of the following steps:

Java can be installed on all platforms to which the Java Development Kit has been ported. An overview of all available JDK ports as well as the latest Java version can be found on the ORACLE website.

In order to install Java 8 SE (Standard Edition), you must first download the latest JDK from the manufacturer’s website. You can find the current JDK here:

The following figure shows the available ports of the current JDK 8 version:

Installing Java 8 - ports of the JDK 8

Install Java – Current ports of the JDK 8 (as of 2015-04-23)

If you want to program a Java application under Microsoft Windows 7 (64 Bit), you have to use the JDK called Windows x64 the correct choice. The required Java installation file in this case is called jdk-8u45-windows-x64.exe.

After downloading the latest JDK it is useful to check if there is already a Java version installed on the computer and which version it is.

Checking the installed Java version

The version number of the Java version installed on the system can be displayed very easily. The JDK and also the JRE have a version string which can be printed on the command line.

In Windows 7, the currently installed Java version is checked as follows:

  1. First open the command line (click start button> enter "cmd" in the input field)
  2. Enter "java -version" in the command line

Check installed Java version

Check the currently installed Java version with the command "java -version" in the command line

As you can see in the picture above, the Java version 1 is installed on the system.7.0_45 used. This corresponds to the now obsolete Java version 7. Therefore, the latest Java version should be installed on the computer.

The following three sections describe the step-by-step installation of Java 8 Standard Edition on a Windows 7 machine (64 bit). First we will install the latest JDK 8, then the Java documentation and as last step the Java source code into the JDK-Insert directory.

1. Installing the JDK 8 (Java Development Kit)

The installation of the current Java 8 Standard Edition requires only a few installation steps under Windows 7.

The installation file should have been downloaded as described above and can be started directly by double-clicking on it.

Next, a dialog window opens which guides us through the installation process.

plhq_teaser_hbox_gelb_fotolia_RA Studio_46292813

Our big
Android Online Course
Complete package

  • Ideal for practical start in the development of Android apps
  • Especially beginner friendly – each step is exactly documented
  • Contains all 35 lessons of our Android Apps Programming Course
  • Contains all 8 lessons of our SQLite Database App Programming Course

Proceed as follows when installing Java version 8:

  1. Execute the Java installation file
  2. Installing the JDK 8
  3. Installing the JRE 8
  4. Finishing the installation of Java 8

Step 1: Execute the Java installation file

First change to the directory where the Java 8 installation file is located, then start the installation program by double-clicking on the installation file.

Java 8 installation file

Execute the Java 8 installation file with a double click

Step 2: Installing the JDK 8

The first dialog informs about the JDK. With a click on Next we get to the second dialog.

The components to be installed and the installation directory are displayed. The default settings can be applied directly.

Click Next to start the installation of the JDK. The third dialog informs about the installation progress of the JDK 8.

Java 8 Installation Dialog 1

Installing Java 8: Dialog 1 – Welcome to the installation of JDK 8

Java 8 Installation Dialog 2

Install Java 8: Dialog 2 – Selection of components and installation directory

Java 8 Installation Dialog 3

Install Java 8: Dialog 3 – JDK 8 installation progress

Step 3: Installing the JRE 8

After the installation of the JDK has been completed, the fourth dialog can be used to specify the installation directory of the JRE 8. Again, the default settings can be used directly.

Clicking Next starts the installation of the JRE. The fifth dialog informs about the installation progress of the JRE 8.

Java 8 Installation Dialog 4

Install Java 8: Dialog 4 – Select the installation directory of the JRE

Java 8 Installation Dialog 5

Install Java 8: Dialog 5 – JRE 8 installation progress

Step 4: Completing the installation

After the installation of the JRE has been completed, the sixth dialog informs us about the successful installation of the Java SE Development Kit 8. So we have installed Java 8.

Clicking Close closes the installation program.

Java 8 Installation Dialog 6

Install Java 8: Dialog 6 – JDK 8 has been installed successfully

When all the above steps are completed, Java 8 is installed on the computer.

2. Installing the Java 8 documentation

Android Apps Programming Online Course

Our big
Android online course
Complete package

  • Ideal for the practical start in the development of Android apps
  • Especially beginner friendly – each step is exactly documented
  • All 35 lessons of our Android Apps Programming Course
  • All 8 lessons of our SQLite App Programming Course

First you have to download the Java 8 documentation from the Java vendor website.

The Java Platform Standard Edition 8 Documentation can also be viewed online.

The following link leads to the online documentation of Java 8 SE:

In the left sidebar of the Java documentation page under the menu item Downloads the link to the documentation files download page is given.

You can also use the following link, it also leads to the download page of the Java SE Development Kit 8 Documentation from Oracle:

Two documentation archives can be downloaded from there.

For us only the upper one with the name "Java SE Development Kit 8u45 Documentation" is relevant.

It contains all HTML files of the Java 8 documentation and has the file name [As of 2015-04-23].

Once you have downloaded the Java documentation archive, the following steps are required to install the Java documentation:

  1. Unpacking the Java documentation archive
  2. Copy the documentation files to the JDK directory

Step 1: Unpacking the Java documentation archive

Using archiving software (z.B. WinZip. WinRAR), the documentation files must be unpacked. The files must be installed in the directory docs unpack it.

Install Java 8 Documentation 1

Install Java documentation: Step 1a – Unzip the documentation files

Install Java 8 Documentation 2

Install Java documentation: Step 1b – All files unzipped to docs documentation directory

Step 2: Copy the documentation files into the JDK directory

Now all documentation files are in the directory docs.

This directory must now be placed in the JDK directory (was specified during the installation of JDK 8) z.B. C:\Program Files\Java\jdk1.8.0_45 be copied.

Install Java 8 documentation 3

Install Java documentation: Step 2a – Copy the docs directory to the JDK directory

The installation of the Java 8 documentation is now complete.

The Java documentation is viewed via a browser. It is therefore a good idea to create a bookmark that points to the main document (depending on the location of the JDK directory, z.B. file://localhost/C:/Program%20Files/Java/jdk1.8.0_45/docs/index.html ).

Install Java 8 documentation 4

Install Java documentation: Step 2b – Create bookmarks in a browser (here Opera)

3. Installing the Java 8 source code

The installation of the complete Java source code is very simple. The source files are already in the JDK 8 installation directory and only need to be unpacked.

To do this, the contents of the archive must be unpacked into the src directory in the JDK installation directory.

The following two figures show how to install the Java 8 source code:

Install Java 8 source code 1

Install Java source code: Step 1 – Unzip the archive file

Java 8 source code install 2

Install Java source code: Step 2 – Source code folder /src in JDK installation directory

4. Entering the Path in the environment variables

Java 8 expects correctly set environment variables, so next we need to install the bin directory located in the JDK-installation directory into the search path (Path) for executable files.

If the system variable Path is not set, you must always specify the full path to the executable file to run it. This would look like this:

C:\> "C:\Program Files\Java\jdk1.8.0_45\bin\javac"

It is therefore useful to set the search path permanently in the system variable Path save it, so that it is still present after a reboot.

To store the search path permanently, the complete path of the jdk1.8.0_45/bin directory to the system variable Path should be entered. Mostly the complete path looks like this or similar:

Under Windows 7 the system variable Path changed as follows:

  1. Click Start , then Control Panel , then System , then Advanced System Settings
  2. Click the Advanced tab , then Environment Variables.
  3. Add the path of the bin folder of the JDK-Installation into the system variable Path a. Your Path variable could then look like this, for example:

C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jdk1.8.0_45\bin

Hints regarding. the system variable Path:

  • The system variable Path consists of a series of directories separated by semicolons.
  • It is not case-sensitive and is viewed by Windows in order from left to right.
  • There should be only one bin -folder of the JDK-Installation must be entered. The other following will be ignored.
  • The search path should be added to the end system variable Path enter.
  • Only after opening a new console window changes of the system variable Path in force.

The following figures show how the path of the JDK installation directory in the search path (Path) is entered for executable files under Windows 7:

Java 8 Path set 1

Set Java 8 Path: Step 1 – Click Start> Open Control Panel

Java 8 Path set 2

Set Java 8 Path: Step 2 – In Control Panel> Open system

Java 8 Path set 3

Set Java 8 Path: Step 3 – In System> Click Advanced System Settings

Java 8 Path set 4

Java 8 Path set: Step 4 – In Advanced System Settings> click on environment variables

Set Java 8 Path 5

Java 8 Path: Step 5 – In Environment Variables> Click and edit the system variable Path

Set Java 8 Path 6

Set Java 8 Path: Step 6 – System Variable Path> Append path of JDK installation directory

check if the Path variable is set correctly

To check if the path was set correctly, the Path-variable can be output to the console.

  • To do this, enter the command "path" in the command line.
  • Now the command "javac -version" should also output the version of the Java compiler

Check Java 8 Path

Check if the path is set correctly and output the version number of the Java compiler

5. Check if Java 8 is installed correctly

When the JDK 8 is installed and then the path of the bin directory of the JDK installation is written to the environment variable Path has been entered, Java 8 is ready for use. To check if Java 8 is installed correctly, let’s write our first small Java program.

plhq_teaser_hbox_gelb_fotolia_RA Studio_46292813

Our big
Android Online Course
Complete package

  • Ideal for practical introduction into the Android app development
  • Especially beginner friendly – each step is exactly documented
  • Contains all 35 Lessons of our Android Apps Programming Course
  • Contains all 8 lessons our SQLite database app programming Course

To do this, we will follow the steps below:

  1. Create a source file: A source file contains the source code. This is written in the Java programming language. The source code can be understood by other programmers. The source file is created with a text editor and also changed.
  2. Compile the source file into a .class file: Translating the source code into instructions that are understood by the Java virtual machine is called compiling. This process is called by the Java compiler (javac.exe) is executed and as a result you get bytecode .
  3. Execute the Java program: The created .class file is called and executed using the Java interpreter. A message is displayed on the screen.
  4. Exit the Java program: As soon as the main-method of a Java program has been terminated, the entire Java program is also automatically terminated (except in the case of multithreading). In case of an infinite loop, a serious programming error, the Java virtual machine can be terminated manually by pressing the key combination CTRL + C.

Step 1: Create a Java 8 source file (source file)

For the creation of a Java 8 source file a normal text editor is used, e.g.B. the Notepad (Start>Programs>Accessories>Editor), requires. Open this file and insert the following source code:

The upper source file contains the definition of the class HelloWorld with the main-Method. The main-Method contains the main program of our Java 8 application.

Make sure to type only the source code and not also the line numbers.

hint: All variables, statements and file names must be written as specified. The Java compiler (javac) and the Java interpreter (java) are both case sensitive. This means that for Java there is a difference between the class "HelloWorld" and "helloworld" exists. Therefore you always have to pay attention to the upper and lower case letters. Furthermore the main class and the file name must be identical. In our example our main class is called "HelloWorld", so the file "" are called.

In the Windows 7 editor the source file looks "" as the file name:

Create Java 8 source file 1

The Java 8 source file "" in the Windows 7 editor

Afterwards the source file must be saved under the filename "" be saved. To do this, click in Notepad on File>Save as… and enter as filename "" a. The file should be saved in a separate directory. In our example the file is placed under E:\java.

If everything was followed correctly, the Save as-dialog looks like this:

Create Java 8 source file 3

The source file " java> now just click save

With a click on Save the source file "" stored in the selected directory.

Step 2: Compile the source file into a .class file

The first thing to do is to open the command line (click start button> enter "cmd" in the input field) can be opened. Afterwards you have to navigate into the directory where your source file is located. In our example this is at drive E the directory E:\java .

In the directory must be the source file "" are located. With the command dir the content of the directory can be displayed. This is shown in the figure below:

Java 8 source code compile 1

Into the directory with the source file "" change

Now the Java 8 source file of the Java-compiler (compile). The following command must be entered in the command line:

The Java-compiler starts compiling immediately. Thereby it translates the source code into bytecode and save it in the file "HelloWorld.class" in the same directory.

There should now be 2 files in the directory (see picture below):

  • The Java source file ""
  • The bytecode-File "HelloWorld.class"

Java 8 source code compile 2

Compile the Java 8 source file> with the command "javac"

Now that we have created the .class-file, we can next create our first Java-Start program!

Step 3: Run the Java 8 program

Around the compiled bytecode-File "HelloWorld.class" the Java interpreter java.exe used. To do this, we enter the following command in the same directory:

Attention! The extension .class must not be specified with.

Often the Java interpreter gives the error message "NoClasDefFoundError. reasons are:

  • The name of the class is misspelled.
  • There is no main-Method exists.
  • The main-method is not declared correctly.
  • The ending .class was displayed with.

Our Java 8 program should now start and in the command line the message "Hello ProgrammingLearnHQ World." output.

If everything worked correctly, the console should look like this:

The .run class file> with the command with "java HelloWorld

If the above text is also output on your system, Java is installed correctly and your first Java-Program works correctly.

Step 4: Exit the Java 8 program

With our first Java-program runs this step automatically.

Normally a Java-program terminates after the main-method was processed. This happens completely automatically.

Should a started Java-If the program does not come to the end on its own, then very often there is an infinite loop, which is not left anymore. In this case the Java-program also no longer responds to user input, such as key and mouse input.

If this should happen, the Virtual machine, in the all Java-programs are running, should be terminated manually.

This stalling is executed with the key combination CTRL + C. Be careful, this will cause the Java-program does not exit properly and edited data can be lost.

Comments 45

I tried to download the Java SE Development Kit 8u45 Documentation, however Oracle wants me to create an account for it. However, only companies can register with Oracle. How do I get this file?

yes this is true unfortunately. I just tried it myself.

With the current Java SE Development Kit 12 the tutorial should work as well. The Java SE Development Kit 12 can be downloaded without login.

Many greetings,

Is it still worthwhile to use this Java version on Windows 10? I need to learn a program on my own for school and came across this site.
Thanks in advance&

Java 8 can still be used on Windows 10 without problems. Of course it is better to always work with the current Java SDK version. In the next time I will update this post, so that the newest Java version is used.

Many greetings, Chris

I have a problem. I use Windows 10 and have JDK-11.0.1 downloaded and installed. Likewise I also have downloaded, unpacked and the folder "docs" with content into the directory of jdk-11.0.1 shifted.
When unpacking the file "" in the subfolder "jdk-11.0.1/lib" the problems appeared. I could not extract the files to the "src" folder. I unzipped them in place, created the folder "src" in this subfolder and copied the unzipped files in this folder (ex.:c:\Programs\Java\jdk-11.0.1\lib\src\java.base…).
When I ran the file "HelloWorld" after I successfully created the class file, I got the following error message:

What did I do wrong?

the src/ folder is not needed for compiling and running Java programs. It contains only source code, which can be viewed for self-study. It has nothing to do with the error message.

According to the error message, the HelloWorld program was compiled by a more recent Java runtime version, but executed in an older Java runtime version. This means that your Java program was compiled by a very recent Java compiler version. As a result, your Java program is no longer compatible with the Java runtime environment installed on your computer (Java Runtime Environment), in which your Java program is executed.

There are probably different Java versions installed on your computer. To solve the problem, the version of the Java Development Kits (JDK) with the version of the Java Runtime Environments (JRE) match. The best thing to do is to uninstall all Java installations from the machine and then install the latest one Java Development Kit (JDK), where automatically the matching Java Runtime Environment (JRE) is installed with. Then the versions of JDK and JRE identical and the error should have been fixed.

I hope my explanations help you and are understandable.

Many greetings, Chris

unfortunately I had a problem, because it does not recognize the container "javac.
Did I do something wrong before?
Would be very happy about help.

Thanks in advance.

please try once from the command line into the am-directory of the JDK installation and there execute the command javac.exe to run. Does this work for you?

Best regards, Chris

Hello, thanks for the great description. I only had to use "Program files" in the path. Worked immediately !

Class Introduction!
With the current version 10.0.1 is the by the way in the lib folder.

Am already curious about the app course! Used to learn Java, but forgot almost all of it…

thanks for the hint! I will pay attention to this when updating the manual.

Best regards, Chris

where can I find JDK (Java Development Kit) for Windows 7 (32 Bit)?
Bernhard Timi.

the matching JDK for Windows 7 (32 Bit) can be found on Oracle’s site:

For Win 7 with 32 bit the following installer is suitable: Windows x86 – 189.22 MB – jdk-8u111-windows-i586.exe [state 26.12.2016]

Many greetings, Chris

thanks to your instructions and a little trial and error with the different versions, it finally worked for me and Java is installed and running.

thanks for the praise! Then have fun with Java.

Greetings, Chris

Super detailed and great illustrated this manual!

It tempts at most to careless mistakes and then you start quickly, bsp. how to fiddle around in the path configuration and possibly. not knowing how to type something correctly.

With Win 10 the problem occurred, simply because the peace was missing, but consistently entered the path in a line, in the sense of "C:\Program Files\Java…" etc. then brought the correct assignment. The entry was then additionally moved manually to the very bottom of the list, i.e. by a few positions, and then it was made to match. "HelloWorld could be compiled as application" and the output javac -version finally showed: "javac 1.8.0_92" (according to today’s status).

By the way, a typo was already hidden in my cmd to query not "java – version" but "java-version". So always pay attention to certain details, like in this case regarding. Space before hyphen&

Again reiterated; great and more of the same, from these step by step guides! As a first step, certainly laborious, but afterwards certainly the less questions arise!

thanks for your praise!

Typos can happen very fast and it is very hard to find them yourself. Only a step-by-step approach will help, as this will narrow down the cause of the error considerably.

Best regards, Chris

Super explanation, wonderfully detailed. Thanks for that!

Runs almost identically on Win 10.
The environment variables are even a little clearer to handle here.

The keyboard shortcuts are helpful:
– Win+r (Run)
– Win+x (quick access to various administration tools, including the Control Panel; I have no idea yet how to get there in Win 10 via navigation)

thank you very much for the praise and the very helpful shortcuts. Win+x I did not know so far.

Many greetings, Chris

such a super tutorial. Many, many thanks!
And I was so creeped out by this Java ..

Kind regards

thanks for your praising words!

Sometimes the Java installation can be a pain in the ass. If the JDK but once installed and running correctly, working with Java is very comfortable and unproblematic.

Many greetings, Chris

Very cool tutorial from you!
I have only unfortunately a problem with the installation of the source codes. When I try to edit the file src.extracting zip to src always comes up with this error message for me:
"com\sun\imageio\plug…\BMPCompressionTypes".java" cannot be edited
And this continues then with the further files in such a way.
Can you help me with this?. help further?
Thanks in advance!

Then follows this detailed error description

File is extracted: C:\Program Files\Java\jdk1.8.0_73\
Extract to "C:\Program Files\Java\jdk1.8.0_73\src\"
Use paths: Yes. Overwrite files: No
com\sun\imageio\plugins\bmp\BMPCompressionTypes".java" cannot be edited.
Fatal error: Not authorized or able to create an output directory.

it looks like the unpacker doesn’t have the rights to create the source directory.

You can use the file to another place on your harddisk as well. The source files are not needed for programming Java applications, but are meant as a kind of documentation for those who are particularly interested.

Greetings, Chris

many, many thanks for your great step-by-step instructions. I’ve been working on KitKat and Lollipop architectures for the last few months, modifying and adapting Android Stock ROMS to my needs and now I want to go productive myself.
I am also already 45 years and am fascinated and taken by the many possibilities especially in the area of personalization.

Kind regards

thanks for the praise!

Android in combination with Java is very fascinating and also very well thought out. There app development is just fun and the possibilities are huge.

Many greetings, Chris

Just great , many many thanks,
so I can’t find words to express my happiness and joy about the work that has been done, for such things even a few euros or a few euros as a donation are not a pity.

thanks for the praise! We are very glad if our website is helpful for the readers.

Many greetings, Chris

Thank you very much for this very good introduction.
With it even I managed to complete the installation steps
to trace.
Only in the last step, the compiling, I had to
the file "" in "Helloworld.rename "java.
However, I also have Windows 8.

thank you for the praise!

Probably in your source code the class name will be "Helloworld" instead of "HelloWorld". Since Java is case sensitive, the class file must be written like the class name in the source code. If the class name is "Helloworld", the class file "" should be. With the class name "HelloWorld" the class file must be named accordingly " called "java.

Many greetings, Chris

I have a problem with the installation. I can’t find the "" document. Can someone help me with this ?

now I have found it myself&
This tomatoes on the eyes terrible&

thanks for this website, the effort and the commitment to help strangers with programming.

If I want to update Java (JDK, Documents …) later, do I have to do the same steps manually as the first installation or does it happen automatically??

thanks for the praise. It is also a lot of fun to help learn programming.

With a small update of Java thus bspw. from subversion 1.8_45 on 1.8_62 should not change too much, so much happens automatically. But I have never checked this exactly.

When doing a major upgrade from Java 8 to 9, all steps should be done again so that you have a clean reinstallation. However large Java updates do not appear monthly, but let much longer wait for themselves. So you have this problem very rarely.

Many greetings, Chris

thanks for your effort. I think I continue here and learn with well 53 years now also Java.

then I wish you much success and fun in learning Java. Once you’ve got the hang of Java, you can move on to Android. Developing your own applications for the smartphone or tablet is a lot of fun!

Greetings, Chris

Great, everything has worked as described so far.

Found everything, although I’m using Windows 8.1 work. I’m curious to see what else will be possible, because I have a few concrete ideas for apps that I could use, and want to write myself with the help of your tutorial. Hope it works !

Thanks for your detailed instructions!

nice if everything worked for you. When developing Android apps you need patience and perseverance at the beginning. With time you get to know the Android system better and understand the connections better and better. It is definitely worthwhile to start with Android programming, even if the entry is quite demanding.

Many greetings, Chris

thank you first for your detailed description. I have finally managed that at least the javac version is shown to me. But had to put the directory for it in the environment variables also in the user variables. Alone with the system variables it did not suffice with me.
However, I get the error message that javac does not translate the file could not find.

"javac: file not found:
Usage: javac
use -help for a list of possible options"

Can you please help me?

Thanks in advance.

Congratulations that javac is now running. Installing Java can sometimes be a pain in the ass. With time you get a feeling for it, but in the beginning problems are not rare.

The Java compiler "javac" should actually work for you, if you get the version displayed.

Like this post? Please share to your friends:
Leave a Reply

;-) :| :x :twisted: :smile: :shock: :sad: :roll: :razz: :oops: :o :mrgreen: :lol: :idea: :grin: :evil: :cry: :cool: :arrow: :???: :?: :!: