0

So, I have tried everything that I know of possible. I ran an export CLASSPATH=/path/to/bin/classes, and it still isn't able to find the output. I've tried running the command from $PWD/bin/classes, the project's root, and STILL am having troubles getting this to work properly. I have the latest version of the ndk (r8-1 at the time of this writing) and the sdk as well. Generating header files via command line, etc.

So far, I've seen Javah error while using Jni, as well as another question which specified the same problem and received the same answers.

I'm running Arch Linux (Archbang, specifically) in x86_64.

Here's my invocation and output (executed from $PROJECT_ROOT/bin/classes):

javah -d ../../jni com.example.fibonnacinative.libfib

Error: Could not find class file for 'com.example.fibonnacinative.libfib'

I've tried with the -classpath, -verbose, etc. flags and neither appear to help. -classpath just spits out the same error, and -verbose does not give me any information apart from the output I've posted.

Halp?

Community
  • 1
  • 1
zeboidlund
  • 9,731
  • 31
  • 118
  • 180
  • Setting explicit classpath is necessary only when you need to execute javah from another folder than the root of your compiled packages. If running from that root WITHOUT classpath doesn't work, then setting it won't help. In the `$PROJECT_ROOT/bin/classes`, do you have subfolders `com/example/fibonnaciactive` and a `libfib.class` file in there? The classname looks somewhat suspicious to me, as it doesn't follow the de-facto camelcase naming standard of Java. – Pavel Zdenek Jul 08 '12 at 10:45
  • i had to look up 10-4., thanks for expanding my knowledge, but what does it mean in context of SO? :) – Pavel Zdenek Jul 08 '12 at 19:45

1 Answers1

0

Yup! It was based on my stupidity.

I should have followed casing conventions for LibFib by typing com.example.fibonnacinative.LibFib as opposed to libfib.

Note: the class itself is typically camel case, whereas the rest of the package directive is lowercase. These are just conventions, mind you.

Sorry folks.

zeboidlund
  • 9,731
  • 31
  • 118
  • 180