Ionic on Ubuntu get java error when run “ionic emulate android” command


#1

I cannot run the “ionic emulate android” command.
I keep getting following error message:

I have already installed the java,
when I run “java -version”, i got this

java version "1.7.0_95"
OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.14.04.2)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)

when I run “which java”, I got this

/usr/bin/java

Is anyone, have an idea why am I getting this error?
I’m using Ubuntu 14.04.

Thanks in advance!