<div dir="ltr">I think the startup time might be related to all static symbol lookups.<div>So I'm manually including just what is needed:<br></div><div><div><div style="background-color:rgb(30,31,34);color:rgb(188,190,196)"><pre style="font-family:"JetBrains Mono",monospace;font-size:9.8pt"><span style="color:rgb(197,118,51)">jextract </span>--output src -t com.sun.glass.wayland.extracted \<br> --header-class-name GlassWayland \<br> <span style="color:rgb(197,118,51)">`pkg-config </span>--libs glib-2.0 gio-2.0 libportal wayland-client<span style="color:rgb(197,118,51)">`</span> \<br> <span style="color:rgb(197,118,51)">`pkg-config </span>--cflags-only-I glib-2.0 gio-2.0 libportal wayland-client<span style="color:rgb(197,118,51)">`</span> \<br> glass-wayland.h \<br> --include-function xdp_portal_initable_new \<br> --include-function xdp_session_close \<br> --include-function xdp_portal_open_file \<br> --include-function xdp_portal_open_file_finish \<br> --include-function g_object_unref \<br> --include-function g_timeout_add \<br> --include-function g_add_idle \<br> --include-function g_main_loop_run \<br> --include-function g_main_loop_new \<br> --include-function g_main_loop_ref \<br> --include-function g_main_loop_unref \<br> --include-function g_main_loop_quit \<br> --include-function g_settings_new \<br> --include-function g_settings_get_int \<br> --include-function wl_display_connect \<br> --include-function wl_display_disconnect \<br> --include-function wl_display_roundtrip \<br> --include-function wl_display_dispatch_pending \<br> --include-typedef GAsyncReadyCallback \<br> --include-typedef GSourceFunc \<br> --include-typedef GError<br></pre></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em seg., 22 de abr. de 2024 às 13:24, Philip Race <<a href="mailto:philip.race@oracle.com">philip.race@oracle.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div>
As a reminder, using FFM will require all FX *applications* to
specify --enable-native-access on the command line<br>
Although this is likely coming to JNI soon too.<br>
<br>
<a href="https://docs.oracle.com/en/java/javase/21/core/restricted-methods.html" target="_blank">https://docs.oracle.com/en/java/javase/21/core/restricted-methods.html</a><br>
<br>
But one thing to watch out for with FFM is startup + warm up time.<br>
I struggled a lot with that in using FFM for just one library in the
java.desktop module.<br>
<br>
-phil<br>
<br>
<div>On 4/22/24 9:12 AM, Nir Lisker wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Sorry, we bumped to Java 21 in JavaFX 22 I think
since we preserve the N-1 rule.</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Apr 22, 2024 at
6:03 PM Nir Lisker <<a href="mailto:nlisker@gmail.com" target="_blank">nlisker@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">I think that we'll be able to bump to Java 25
in JavaFX 25, like we did with 21. I suggested initially to
bump to Java 22 exactly for FFM as it's very useful for
JavaFX, but was told we shouldn't since it's not an LTS
version.
<div><br>
</div>
<div>I have no idea how long the work on Wayland will take
including the code review (a rather long process), but you
should be able to request code reviews with FFM and have
it ready for integration by Java 25.</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Apr 22, 2024 at
5:49 PM Thiago Milczarek Sayão <<a href="mailto:thiago.sayao@gmail.com" target="_blank">thiago.sayao@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">I was just experimenting, but it seems to
be less work than going with JNI.
<div>If I am correct, the next Java LTS will be 25,
which will be required on JavaFX 29 to be released on
September/29.<br>
</div>
<div><br>
</div>
<div>It's 7 years - that's really too much.</div>
<div><br>
</div>
<div>Maybe it's still worthwhile to prototype using FFM
and then port everything to JNI.</div>
<div><br>
</div>
<div>-- Thiago.</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Em seg., 22 de abr. de
2024 às 11:21, Kevin Rushforth <<a href="mailto:kevin.rushforth@oracle.com" target="_blank">kevin.rushforth@oracle.com</a>>
escreveu:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Note
also that we cannot use Panama in the JavaFX internals
yet, since <br>
the minimum version of the JDK is 21.<br>
<br>
-- Kevin<br>
<br>
<br>
On 4/21/2024 10:51 AM, Thiago Milczarek Sayão wrote:<br>
> Hi,<br>
><br>
> I did a small test app to explore Wayland client
and portals (for <br>
> Robot and dialogs such as file open/save).<br>
><br>
> <a href="https://github.com/tsayao/wayland-test/blob/main/wayland-test.c" rel="noreferrer" target="_blank">https://github.com/tsayao/wayland-test/blob/main/wayland-test.c</a><br>
><br>
> It seems it will work as a glass backend, but
some walls will be hit <br>
> on the way :)<br>
><br>
> I have tried to use jextract (from project
Panama) to work directly <br>
> with java, but it seems it does not support wl_
types.<br>
><br>
> -- Thiago.<br>
<br>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
<br>
</div>
</blockquote></div>