Download, Install, and configure JAVA on Your System

Java Development Kit (JDK) allows you to code, and run Java programs. You may install multiple JDK versions on the same PC. But It's recommended that you install only the latest version.


Install Java on Windows

Follow my steps to download and install Java, without having an error:

1. Download the JDK file from here. Accept the agreement and download.


2. Install Java from the download source and double-click to install.


3. Leave all the settings as defaults unless you have a reason to change them. Click next till you see this screen.


4. This finishes the installation. Just click the Close button.


5. Now rename jdk 15.0.2 to jdk (C:\Program Files\Java).

6. Open jdk folder, and open bin file. Now open the command from here by holding the shift key and right key on your mouse.

C:\Program Files\Java\jdk\bin>   java --version
java 15.0.2 2019-07-16
Java(TM) Runtime Environment (build 15.0.2+10)
Java HotSpot(TM) 64-Bit Server VM(build 15.2.2+10mixed modesharing)
C:\Program Files\Java\jdk\bin>

Set Environment Variable for Java

To access Java directly from the command prompt, you just have to set the environment variable. Follow my steps:
1. Right-click on This PC > Properties > Advanced System Settings > Environment Variable



2. Create a new user variable. Set the variable name to JAVA_HOME and Variable Value to C:\Program Files\Java\jdk.


3. Now in system variables double click on the path and paste here the path of bin file inside JDK folder.



4. Save them all and open command Prompt(CTRL+R and type cmd) and run java.
 
Microsoft Windows[Version 6.3.9600]
(c) 2013 Microsoft Corporation. All right reserved.

C:\users\mrdev> java --version
java 15.0.2 2019-07-16
Java(TM) Runtime Environment (build 15.0.2+10)
Java HotSpot(TM) 64-Bit Server VM(build 15.2.2+10mixed modesharing)

C:\users\mrdev>
Now you see you have successfully installed Java in your system.

Java For Linux

Java comes pre-installed with any Linux distros. If Java is not in there then  run the following commands:

┌──(mrdev㉿kali)-[~/Desktop]
└─$ sudo apt-get install default-jdk  #To download JDK
┌──(mrdev㉿kali)-[~/Desktop]
└─$  sudo apt-get install default-jre   #To download JRE
Tags

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

#buttons=(Ok, Go it!) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Ok, Go it!