Need help with Java Installation

0 votes
I want to install java on my windows 10 machine. So please help me with the exact application to be downloaded. Should I install JDK or JRE. What's the difference and from where I can install them?
Feb 27, 2019 in Java by Ashmita
1,031 views

1 answer to this question.

0 votes

Hi @Ashmita, to asnwer your question, lets go one by one:

1. Difference between JDK and JRE:

JDK is basically used for developing, testing and debugging java apps and applets. It can also be used to run the apps as it's a complete package and it contains JRE in it along with other tools like compilers, debuggers etc. While JRE provides the libraries, JVM and other necessary components to run the apps written in java. But JRE can't be used to create or modify the java applications.

So it totally depends on your usage... If you want to develop java applications, then you should install JDK. Otherwise if you just want to run some applets or apps, you can simply install JRE. 

2. Installation steps for JDK:

  • Go to this link: https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html to install the latest version of JDK i.e. JDK-11.0.2. Click on 'Accept Licence Agreement' and click on the highlighted file to download:
  • Once clicked, the setup will start downloading and you can find it in the default 'Downloads' folder. 
  • After download gets completed, double click on the file to start installation. It will first ask for your permission to install the app. Click 'Yes'.
  • Now the installation wizard window will pop-up. Click 'Next' to proceed further:


     
  • Click 'Next' to install the default features installation. You can select optional features too, at this screen:


     
  • After clicking 'Next' in above step, installer will start extracting the files and installing the JDK on your machine. once completed, you will see another window showing message "JDK Successfully Installed". Click 'Close' to close the installer wizard.
  • Now open 'View Advanced System Settings' and it will open 'System Properties' window. Click on 'Environment Variables' :

     
  • On Enviroment Variables screen, click on 'New' under 'System Variables' to add a new variable for Java path:

     
  • Add the below mentioned 'Variable Name' & 'Variable Value' to your new environment variable and click 'OK' :

     
  • And that's it. Your JDK is installed successfully. You can check for the same by opening Command Prompt and typing this command: 'javac -version'.

3. Installation Steps for JRE:

  • Go to this link: https://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html to install the latest version of JRE. Click on 'Accept Licence Agreement' and click on the highlighted file to download:

     
  • Once downloaded, double click on the file and click on 'Install' to start installation wizard:

     
  • Now installer will extract the files and start installing the setup. After successful completion, another window will display showing the message 'Successfully installed Java. Click 'Close' to close the installation wizard.
  • And the JRE is installed on your system. To check the same, open 'Command Prompt' and type this command: 'java -version'.
answered Feb 28, 2019 by Pratibha
• 3,690 points

Related Questions In Java

0 votes
4 answers

How can we display an output of float data with 2 decimal places in java? Please help

You can use DecimalFormat. One way to use ...READ MORE

answered Dec 16, 2020 in Java by Gitika
• 65,770 points
164,641 views
+5 votes
4 answers

How to execute a python file with few arguments in java?

You can use Java Runtime.exec() to run python script, ...READ MORE

answered Mar 27, 2018 in Java by DragonLord999
• 8,450 points

edited Nov 7, 2018 by Omkar 81,376 views
0 votes
1 answer

Need for finalize() in Java

finalize() is a method called by the ...READ MORE

answered May 9, 2018 in Java by code.reaper12
• 3,500 points
703 views
0 votes
1 answer

Is it possible to create a memory leak with Java

Here's a good way to create a memory ...READ MORE

answered May 31, 2018 in Java by Parth
• 4,640 points
2,281 views
0 votes
1 answer

How to pad an integer with zeros on the left in Java?

Use java.lang.String.format() method. String.format("%05d", number ...READ MORE

answered May 31, 2018 in Java by Daisy
• 8,140 points
2,294 views
0 votes
1 answer

What is the difference between jdk and jre?

JRE: It stands for Java Runtime Environment. ...READ MORE

answered Apr 20, 2018 in Java by Akrati
• 3,190 points
1,990 views
0 votes
2 answers

How can I get the filenames of all files in a folder which may or may not contain duplicates

List<String> results = new ArrayList<String>(); File[] files = ...READ MORE

answered Sep 12, 2018 in Java by Sushmita
• 6,920 points
1,935 views
0 votes
1 answer

The best way to filter a Java Collection?

 this problem is solved using streams and ...READ MORE

answered May 29, 2018 in Java by Parth
• 4,640 points
845 views
0 votes
1 answer
0 votes
1 answer

Install Java on Ubuntu

Hi @Anvi, to install Java on Ubuntu, ...READ MORE

answered Mar 1, 2019 in Java by Pratibha
• 3,690 points
1,682 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP