0

Following this tutorial to use Opencv Face Detection. At 4:00 he wrote on terminal:

C:\Users\cvlab\Desktop\MyApplication\app\src\main>javah -d jni -classpath ../../build/intermediate/classes/debug com.example.cvlab.myapplication.OpencvClass

I'm trying to wrote the same path on my code but I'm running into this error:

'javah' is not recognized as an internal or external command

Some of questions which the same already in stackoverflow , but it will not help to get the solutions. Could anyone help me? thanks

Jeru Luke
  • 20,118
  • 13
  • 80
  • 87
DoctorWho
  • 1,044
  • 11
  • 34
  • what is `javah`, shouldn't it be `java`?????? – Rishikesh Dhokare Aug 07 '18 at 10:55
  • @RishikeshDhokare no, javah is an existing command – Stultuske Aug 07 '18 at 10:57
  • @DoctorWho what result does java -version get you? – Stultuske Aug 07 '18 at 10:57
  • @Stultuske I have the same result: 'java' is not recognized as an internal or external command – DoctorWho Aug 07 '18 at 11:45
  • so your java installation is not on your path. you'll need to (correctly) set your environment settings – Stultuske Aug 07 '18 at 11:48
  • @Stultuske need I to install Java? I have seen in other stackoverflow questions that i don't need to install Java. JDK would already be present in Android Studio, or not? – DoctorWho Aug 07 '18 at 12:01
  • @DoctorWho I have no idea whether or not you have Java installed. If you don't, yes, you need a JDK installed. But, whether you have one or not, you need to have an iinstalled version of the JDK that is known to your operating system (meaning it is configured in the environment variables) – Stultuske Aug 07 '18 at 12:08

1 Answers1

0

It means the bin/ folder of your JDK is not in your PATH variable

You can download a JDK from https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Philippe Marschall
  • 4,452
  • 1
  • 34
  • 52