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:
And the class file result of the build would look like the following:
Since we have moved to JDK 1.7 the header file looks like the following:
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.
I don't have 1.6 to verify but your statements about what is generated for 1.7 for the header appear correct.
The 000024 represents the '$' and for 1.7 the inner class is still named using '$'. So for example after compiling in 1.7 the inner class file is named the following...
So a one to one conversion should have kept the 000024 (presuming it does in fact do it that way in 1.6.)
You might want to look at the release notes for 1.7.
If you need a solution you could add a post javah step that renames the file.