If you have MAC OS 10.5 or newer you can just use the below lines:Įxport JAVA_HOME=$(/usr/libexec/java_home)
profile or you can use the vi command vi.profile If you want it to persist always for all sessions, you need to add the command to your ~/.profile file. Note that this sets JAVA_HOME only for a session. Then, run the below command to check your JAVA_HOME. Then set JAVA_HOME on your Mac as shown below:Įxport JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home If you are using higher-level JDK such as JAVA11 or JAVA15 or even greater, please download those JDK versions.Īfter installation checks the below path to find JAVA HOME, for my version it is as shown below. You should go to the below link and install JAVA JDK for MAC OS. I will try to explain each step respectively. In this article, we will learn how to install Appium on MAC OS with all external tools and components.