Command to check java home for mac

broken image

To display a particular variable, use command ' set varname', or ' echo % varname%': // Display a particular variable set COMPUTERNAME COMPUTERNAME=xxxxxx // or, use 'echo' command with variable name enclosed within a pair of '%' echo %COMPUTERNAME% COMPUTERNAME=xxxxxx Set/Unset/Change an Environment Variable for the 'Current' CMD Session Pay particular attention to the variable called PATH. Try issuing a ' set' command on your system, and study the environment variables listed. To list ALL the environment variables and their values, start a CMD and issue the command ' set', as follows, // Display all the variables (in NAME=VALUE pairs) set COMPUTERNAME=xxxxxxx Display Environment Variables and their Values They are typically named in uppercase, with words joined with underscore ( _), e.g., JAVA_HOME. Environment variables are useful to store system-wide values, for examples,

broken image

Environment variables are global system variables accessible by all the processes/users running under the Operating System (OS), such as Windows, macOS and Linux.