Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javah error, cannot find class file

When I tried to use javah to generate header files, I get this error:

Error: Could not find class file for 'HelloWorld'.

Here is my External tools configuration.

Location: ${system_path:javah}

Working Directory: ${workspace_loc:/JniJava/bin/sonyraj}

Arguments: -jni HelloWorld

like image 569
Sony Avatar asked Oct 14 '13 17:10

Sony


1 Answers

Try from the commnnd line/ terminal. maybe javah needs the full path to it? And without packages.

Or fully qualified package name as noted here Javah error while using it in JNI

javah -jni com.example.JavaHowTo

where com.example is your package.

You also need to run javah from the directory containing com/example/JavaHowTo.class

e.g. if your structure is

/home/user/project/Iot/com/example/JavaHotTo.class

run javah from

/home/user/project/Iot
like image 75
tgkprog Avatar answered Nov 18 '22 08:11

tgkprog