H.A
H.A

Reputation: 25

Downloading Java - Should I Change my Path to the Java Bin

This would seem very stupid, but is it necessary to attach the java bin address to Path in the environmental variables?

I also already have an environmental variable called Path - and its value is C:\Users\core\AppData\Local\Microsoft\WindowsApps - I don't know what this variable does, but I've read this Stack overflow question and realized that handling these should be done with care. Do I need to change the value of Path to my java bin address C:\Program Files\Java\jdk-11.0.2 or will this not be necessary if I use an IDE?

Any help would be truly appreciated. Thank you.


Upvotes: 2

Views: 964

Answers (4)

mcvkr
mcvkr

Reputation: 3912

Want to see with the screenshots: Please see how the Path (including the other values you need for your machine to run other software as well ) and JAVA_HOME set in this post

https://stackoverflow.com/a/17142065/2815227

Your config need to be similar except your JDK will be a newer version I guess.

Upvotes: 0

DodgyCodeException
DodgyCodeException

Reputation: 6123

Just follow Oracle's installation instructions:

https://docs.oracle.com/en/java/javase/11/install/installation-jdk-microsoft-windows-platforms.html

These instructions tell you how to change your PATH variable.

If you downloaded the JDK from another supplier, that supplier's website should also have installation instructions.

You don't have to create a JAVA_HOME environment variable. This is only used by some third-party Java-based development tools.

Upvotes: 0

Anitha.R
Anitha.R

Reputation: 354

You need to ADD JAVA_HOME to PATH, not CHANGE the existing value of PATH.

Example,

  1. Current PATH = C:\Users\core\AppData\Local\Microsoft\WindowsApps
  2. Create a new variable JAVA_HOME="your java home"
  3. Edit PATH to include JAVA_HOME
  4. After Edit, your Path will be, PATH = "C:\Users\core\AppData\Local\Microsoft\WindowsApps";%JAVA_HOME%/bin;
  5. Open command prompt, and type javac to test whether Java home and path has been set correctly.

Upvotes: 2

iamrajshah
iamrajshah

Reputation: 979

System environment variables are global to all users, while users environment variables are specific only to the currently logged in user.
From your question it is clear that you are using Windows OS.
You will need to update the JAVA_HOME OR whatever name you have given to variable and it will automatically change the PATH variable.
Note : I hope you have added JAVA_HOME to PATH.

Upvotes: 0

Related Questions