Has anyone tried creating an unused native method declaration in the class to trigger the native header generation? public native void GenerateNativeHeader(); ??? Is that too ugly?
-kto On May 23, 2012, at 8:01 AM, Jonathan Gibbons wrote: > On 05/23/2012 01:00 AM, Alan Bateman wrote: >> On 23/05/2012 08:30, Erik Joelsson wrote: >>> >>> I'm also not sure if Alan's comment was a blocker. The idea with >>> GenerateNativeHeader was approved by Jon Gibbon's initially at least. Alan? >> I don't like holding things up but I do think this needs wider consideration. >> >> -Alan > > There are various solutions here. > > 1. revert to using javah for selected files > 2. give javac a list of classnames for which to generate a native header > 3. move the annotation to somewhere like java.lang.annotation > 4. fix Jigsaw > > None of the first 3 are attractive. The last one may be difficult, but at some > point, it will be necessary. The problems with @GenerateNativeHeader are > not specific to this particular annotation, but rather to any annotation > with RetentionPolicy.SOURCE. However, the problems are somewhat > exacerbated by the use of the annotation in the base module, where we > are on delicate bootstrapping ground. > > -- Jon > >