Last active
September 2, 2019 23:54
-
-
Save Ahmedsaka/612a7819dbc2bec62756d7a076962c30 to your computer and use it in GitHub Desktop.
How to add an environment variable for your java jdk unix OS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open the terminal, make sure you are in your home directory | |
run the following | |
=>ls | |
find the and open the .bash_profile file in an editor with "open -e .bash_profile file", | |
if not create using => "vim ~/.bash_profile" | |
enter : "export $JAVA_HOME=$(/usr/libexec/JAVA_HOME)" | |
run => source ~/.bash_profile | |
To verify the environment variable was been created, run => "echo $JAVA_HOME"or "export | grep JAVA" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment