javah deprecated?
Johan Vos
johan.vos at gluonhq.com
Thu Nov 30 15:27:24 UTC 2017
Hi Kevin,
Just to make sure I understand this approach: you want a (new or existing)
Foo.Java file in the modules/javafx.web space that contains e.g. this:
public static int DIRECTIONALITY_LEFT_TO_RIGHT = Character.
DIRECTIONALITY_LEFT_TO_RIGHT;
Applying javac -h (which the build already does) will generate Foo.h
In modules/javafx.web/src/main/native/Source/WTF/wtf/unicode/java/UnicodeJava.h
we replace the
#include java_lang_Character.h
with
#include Foo.h
Is this correct?
- Johan
On Thu, Nov 30, 2017 at 2:13 PM Kevin Rushforth <kevin.rushforth at oracle.com>
wrote:
> Hi Johan,
>
> Thanks for filing the bug.
>
> If we really do need Character and IDN, then the cleanest approach might
> be to define new fields in a suitable JavaFX class and assign the
> appropriate values to them.
>
>
> -- Kevin
>
>
>
> Johan Vos wrote:
>
> I filed a bug (https://bugs.openjdk.java.net/browse/JDK-8192806) and I am
> looking into it.
>
> It seems a bit weird to me that the java.lang.Character and java.net.IDN
> header files are needed. I'll remove them and see where it fails.
> But if they are needed (and they probably are), it won't be easy to
> generate them with javac -h as that requires the source code instead of the
> classfiles. That would require access to the java.lang.Character and
> java.net.IDN java source code in OpenJDK, from within OpenJFX.
>
> - Johan
>
> On Wed, Nov 29, 2017 at 8:02 PM Kevin Rushforth <
> kevin.rushforth at oracle.com> wrote:
>
>> Hi Johan,
>>
>> Thanks for pointing this out. I had missed that this was targeted to JDK
>> 10.
>>
>> We eliminated all but one use of javah, in favor of javac -h, in JDK 9
>> [1]. The only one remaining is in the web module. I can't remember why
>> that wasn't switched at the same time (I have a fuzzy recollection that
>> it might have had something to do with incremental compilation), but
>> yes, it seems like this will need to be fixed.
>>
>> If you would like to file a bug then this would be a great thing for the
>> community to work on. This will block us from moving to JDK 10 as a boot
>> JDK, so if we end up doing that for JDK 10 then this would need to be
>> done soon.
>>
>> Let me know if you would like to work on this.
>>
>> Thanks.
>>
>> -- Kevin
>>
>> [1] https://bugs.openjdk.java.net/browse/JDK-8161704
>>
>>
>> Johan Vos wrote:
>> > Hi,
>> >
>> > I learned javah might be removed in Java 10 (
>> > http://openjdk.java.net/jeps/313) but as far as I know, it is still
>> used in
>> > OpenJFX:
>> >
>> > defineProperty("JAVAH", cygpath("$JDK_HOME/bin/javah${IS_WINDOWS ?
>> '.exe' :
>> > ''}"))
>> >
>> > Are there already plans to move to javac -h instead?
>> > It seems a relative easy task that might be done by someone from the
>> wider
>> > community?
>> >
>> > Thanks,
>> >
>> > - Johan
>> >
>>
>
More information about the openjfx-dev
mailing list