Ionic framework installation query

I'm following the tutorial from: http://learn.ionicframework.com/videos/windows-android/

When I run Android in the command line it just keeps coming up as JAVA_HOME not defined. I've pointed in the environment variables PATH on my system to the JDK installation but it still doesn't work. Help much appreciated.

In Environment Variables there is a Path variable in that variable add this path "C:\Program Files\Java\jdk1.8.0_40\bin" to it restart CMD and write java in your CMD :). Its shown in this tutorial from 2:24 https://www.youtube.com/watch?v=Bcckp35ny8Y