Java Native Interface (JNI) - problem with javah to generate header file
salam, anyone here know about Java Native Interface (JNI)...it is a tool that function to be as communicator between Java and C/C++ language.....i want ask about generate of header file thats developer must text "javah -jni HelloWorld" in their command prompt...that command will be written after we succesfully created HelloWorld.class that derived from compilation of HelloWorld.java through this command "javac HelloWorld.java"....so, anyone familiar with these things since our company are mastered in Perl, not in Java...i hope i can get something from you all...i already check in internet, they said have problem at classpath....n until now, i dont know how to make classpath correctly...thank you for a reading.. (^_^) ...they said in command prompt that 'javah' is not recognized as an internal or external command, operable program or batch file.. (^_^)
Re: Java Native Interface (JNI) - problem with javah to generate header file
The first thing to do is to make sure you have the Java Development Kit downloaded and installed. You will get that message if the javah executable is not on the path. (This has nothing to do with the classpath). The best way to check the configuration of your installation is to write, compile and run a simple HelloWorld program. There are instructions in Oracle's Tutorial (that link assumes you are using Microsoft Windows).
they said in command prompt that 'javah' is not recognized as an internal or external command, operable program or batch file
Towards the bottom of that page their is a link to the Common Problems (and the solutions) page whose first item is the error message to which you refer. It is discussed in the context of not being able to locate the javac executable rather than the javah one, but the principle (and solution) is the same.
Much of the Tutorial will be of use if you are unfamiliar with Java. Some familiarity is required to use jni as discussed, for instance, in the JNI Technology chapter of Oracle's "Advanced Programming for the Java 2 Platform".