

bash_profile by either restarting the terminal window or using: source ~/. Use the export command to add new environment variables: export =ĥ. bash_profile file with a text editor of your choice.ģ. Permanent environment variables are added to the. In case there are multiple Java versions the following command used to return in the previous macOS release the path of a specific version: /usr/libexec/javahome -v 1.8 The above command in macOS 11.0.1 returns only the latest Java version.

The export command also allows you to add new values to existing environment variables: export =:$ : The value you want to assign to the new variable.

