-
Notifications
You must be signed in to change notification settings - Fork 0
Understanding Path & JAVA_HOME
discorddioxin edited this page Apr 1, 2021
·
5 revisions
When you run a command, such as
java -version
Your OS will look through the directories specified on the path for a program named java
You can find the location of the program by running the following command
- Windows
where java
- Linux & Mac
whereis java
-
Running
javacommands will display an error message "Cannot be found" or "Is not installed" -
Running
wherecommands will display an error message "Cannot find the files" or a blank path (such asjava:with no actual value) -
Double clicking a JAR file may result in nothing happening (since Java isn't properly installed)
Open the terminal/command prompt on your machine
- Windows (not case sensitive)
echo %path%
TODO- Include UI view
- Linux & Mac (case sensitive)
$PATH
TODO - Include scoping
TODO - Explain why JAVA_HOME is required by some programs
TODO - Explain path priority