0

Sorry for asking but I am having trouble generating a Java header file from my code - in command prompt I typed:

javah -o JNIDemoJava.h -classpath JNIDemoJava/build/classes jnidemojava.Main

From what I've read that should have worked but I get this error:

Error: Could not find class file for 'jnidemojava.Main'.

Before you say I forgot to clean and build to compile it I did, but I still have this error if you need more info just ask .

Update: Problem was solved

slavoo
  • 5,798
  • 64
  • 37
  • 39

1 Answers1

0

It seems your command is right. In which platform you run your command? Be cautious to the file separator, it's \ in Windows and / in *NIX.

So in Windows you should

javah -o JNIDemoJava.h -classpath JNIDemoJava\build\classes jnidemojava.Main

In *NIX, you should

javah -o JNIDemoJava.h -classpath JNIDemoJava/build/classes jnidemojava.Main
alijandro
  • 11,627
  • 2
  • 58
  • 74