# Appium 1.6.5 installation - Could not find JAVA, skipping UiAutomator2 install

**URL:** <https://discuss.appium.io/t/appium-1-6-5-installation-could-not-find-java-skipping-uiautomator2-install/18503>\
**Category:** Support\
**Created:** [August 30, 2017, 9:26am UTC](https://discuss.appium.io/t/appium-1-6-5-installation-could-not-find-java-skipping-uiautomator2-install/18503 "2017-08-30T09:26:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![menypeled](https://discuss.appium.io/user_avatar/discuss.appium.io/menypeled/32/97_2.png) [@menypeled](https://discuss.appium.io/u/menypeled)\
**Post date:** [August 30, 2017, 9:26am UTC](https://discuss.appium.io/t/appium-1-6-5-installation-could-not-find-java-skipping-uiautomator2-install/18503/1 "2017-08-30T09:26:28Z")

</div>

ENV:  
macOS Sierra 10.12.6  
Appium 1.6.5 / 1.6.6 - beta4

* * *

When we installed the appium successfully however it seems that the UiAutomator2 isn’t installed (see below log)

Why doesn’t it find the Java & how it can be fixed?

* * *

appium-uiautomator2-driver@0.3.3 install /usr/local/lib/node\_modules/appium/node\_modules/appium-uiautomator2-driver

> node ./bin/install.js

dbug AndroidDriver Getting Java version  
Could not find JAVA, skipping UiAutomator2 install

---

<div class="post-metadata">

**Author:** ![menypeled](https://discuss.appium.io/user_avatar/discuss.appium.io/menypeled/32/97_2.png) [@menypeled](https://discuss.appium.io/u/menypeled)\
**Post date:** [August 31, 2017, 1:33pm UTC](https://discuss.appium.io/t/appium-1-6-5-installation-could-not-find-java-skipping-uiautomator2-install/18503/2 "2017-08-31T13:33:23Z")

</div>

When I run java -version I discover that the path was to the old java instead (1.6) instead of the 1.8.

Steps to fix it:  
Update the bash file with the updated data:

- vim .bash\_profile (Opened the bash from terminal)
- i for edit
- Added the following data:  
export ANDROID\_HOME=/Users/menypeled/Library/Android/sdk  
export ANDROID\_SDK=$ANDROID\_HOME  
PATH=$PATH:/Applications/apache-ant-1.8.4/bin  
PATH=$PATH:/usr/local/share/npm/bin/  
PATH=$PATH:$ANDROID\_HOME/build-tools  
PATH=$PATH:$ANDROID\_HOME/platform-tools  
PATH=$PATH:$ANDROID\_HOME/tools

export PATH=${JAVA\_HOME}/bin:$PATH  
export JAVA\_HOME=$(/usr/libexec/java\_home)  
export PATH=$PATH:$JAVA\_HOME/bin

- esc for exit edit mode
- :wq! for exit & save

Now when running java -version showed the updated java version & when I ran the Appium installation again it finded the java & installed the uiautomator successfully
