Search code examples
eclipsejavah

Javah : The selected resource does not resolve to a Java element


I'm trying to create JNI headers from a Java class using javah in eclipse . I created a Program in External Tools(Run -> External Tools -> External Tools Configuraitons) with these configurations :
Location : ${env_var:JAVA_HOME}\bin\javah.exe
Working Directory : ${workspace_loc:/MyProject/bin/classes}
Arguments : -jni -verbose -d "${project_loc}${system_property:file.separator}jni" ${java_type_name}
But when I run it this error occurs :

The selected resource does not resolve to a Java element

How can I fix this error?
Thanks!


Solution

  • I used this in my Arguments and my problem went away :

    -d ${project_loc:}/jni -classpath E:\Android\adt-bundle-windows-x86_64\sdk\platforms\android-14\android.jar;${project_loc}/bin/classes com.example.myreallyjniproject.MainActivity