Tns not finding java jdk


I am a newbie for nativescript. I am trying to configure envirnoment for Android development following this link. While trying to configure jdk it stucks forever. I have tried installing jdk manullay as well. But tns doctor command still gives this error Error executing command ‘javac’. Make sure you have installed The Java Development Kit (JDK) and set JAVA_HOME environment variable. and this warning × WARNING: The Java Development Kit (JDK) is not installed or is not configured properly.

Any help?



Which OS are you using?

What is the output of java -version command?


I’m also having a similar problem on Ubuntu 18.0.4.

I followed the instructions on the same page listed above, everything installed fine including JDK8 using the oracle installer. When I run tns doctor I get…

✖ Javac version 10.0.1 is not supported. You have to install version 1.8.0. 

But if I check the version myself I get…

$ javac -version
javac 1.8.0_171