

In the System Properties window, click on the "Environment Variables" button.Now, you can copy the environment variables.ĭepending on your operating system, follow the instructions below: Click on the lock icon at the bottom left and enter your password to make changes. On macOS: Go to "System Preferences" and click on "Security & Privacy." Then, click on the "Privacy" tab and select "Full Disk Access" from the left-hand side.You can now copy the environment variables. On Windows: Right-click on the "This PC" or "My Computer" icon on your desktop or File Explorer and select "Properties." In the System window, click on "Advanced system settings" on the left-hand side.To access the environment variables on your machine, follow the steps below: Take note of the path where the JDK is installed on your machine.

The first step you need to take before setting the JAVA_HOME environment variable, is to know the installation directory of the JDK.

How to Set the JAVA_HOME Environment Variable Know the JDK Installation Directory
