This discussion is archived
2 Replies Latest reply: Mar 26, 2013 6:24 PM by EJP RSS

JNI generated header file does not match the class file

999287 Newbie
Currently Being Moderated
We have had a JNI project for many years and all has been fine. Within our libraries we have several classes that have inner enum classes.

Recently we have moved to JDK1.7. Up to now when JNI generated the methods where the signature used the inner enum class, and it was an oveloaded method, we would get something like the following as the signature:

Java_PackageName_ClassName_methodName_OuterClass_00024InnerEnum_2

And the class file result of the build would look like the following:

methodName(OuterClass$InnerEnum)

Since we have moved to JDK 1.7 the header file looks like the following:

Java_PackageName_ClassName_methodName_OuterClasss_InnerEnum_2

The class file is still the same, and because of that when we run the program we get an UnsatisfiedLinkError. I understand that this error is because the VM cannot find the implementation. So why JDK 1.7 generates a header file that does not match the class file?

Thank you in advance.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points