Review Request: JDK-8000406 - change files using @GenerateNativeHeader to use @Native

Dan Xu dan.xu at
Mon Apr 1 15:16:57 PDT 2013

Hi All,

In this fix, I have updated files in JDK libraries to use @Native 
annotation instead of @GenerateNativeHeader  to mark classes that 
contain no native methods but constants used by native codes.

@GenerateNativeHeader was added earlier in the development for 
JDK8."This has proved problematic for some core classes with respect to 
Jigsaw, since the use of such an annotation creates a compile-time 
dependency from the base module to the module containing, 
and the base module should not have any dependencies." After switching 
to @Native annotation, the dependency problem will be solved as 
java.lang.annotation.Native is in the proposed base module. In addition, 
the annotation has been refined not to be on the class level but on the 
constants themselves, which also makes the generated header files much 

This effort is part of JDK-8000404. After jdk libraries uptaking the 
annotation changes, @GenerateNativeHeader annotation will be removed 


Thanks for your feedback!


More information about the macosx-port-dev mailing list