To start building java programs on any system you need to install “JDK”. JDK stands for ”Java Development Kit”. JDK has built in class, methods, defitions etc. Without JDK our program is normal Text file. JDK provide tool to compile and execution.
- Search “JDK download” on google, or goto this link.
- On this link there are multiple versions of JDK available for multiple platforms.
- Choose latest version and accept liecence by clicking on toggle button on top.
- And download according to your operating system. (also check if you have 64bit operating system then download 64bit version of JDK, else download 32bit)
- Download windows executable file of JDK 64bit or 32bit according to your system.
- After downloading install it as normal app, it will also install “JRE” (Java Runtime Environment).
- When installation finish ”Right Click on My Computer icon” and choose “Properties”.
- From left options click on “Advance system settings”.
- Now click on ”Environment Variables” button at bottom.
- Now there will be 2 parts “User variables” and “System Variables”.
- Under “User variable” click on “New…” button.
- Enter variable name “path” and variable value to actual path where jdk is installed. in my system it is like this : “C:\Program Files\Java\jdk1.8.0_91\bin”.
- Click “ok” and again “ok” to close opened windows.
- Now JDK is successfully install on your windows System.
After downloading jdk package “it will be in tar.gz format”
now open terminal and type below commands 1 by 1.
After installation is complete, set environment variables as follows.
Edit the system path in file /etc/profile: Add the following lines at the end.
- After downloading .dmg file from link above.
- Install as normal app.
- when installation finish we need to add java installed location to “Java path”. read here how to add java path.
Subscribe to our newsletter!
We'll send you the best of our blog just once a month. We promise.