Path: csiph.com!aioe.org!.POSTED.QnhDj1eS08EbOOYggLOrCg.user.gioia.aioe.org!not-for-mail From: Graeme Geldenhuys Newsgroups: comp.lang.java.gui Subject: Re: Is JavaFx better than Swing? Date: Thu, 22 Oct 2020 21:46:47 +0100 Organization: Aioe.org NNTP Server Lines: 35 Message-ID: References: NNTP-Posting-Host: QnhDj1eS08EbOOYggLOrCg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Content-Language: en-GB X-Notice: Filtered by postfilter v. 0.9.2 Xref: csiph.com comp.lang.java.gui:5556 On 22/10/2020 9:09 pm, Graeme Geldenhuys wrote: > Just too many barriers - limiting who can run you application > reliably. When it comes to Swing, *everybody* can run your > applications exactly as you indented for them too. No barriers > for the end-user. Oh, and then there is also the matter of size (yes, I'm old school and application size is still something that bugs me). I followed the JavaFX samples and created a Hello World fat jar using Maven from the CLI. On my Linux system that resulted in a 8.25MB jar file. Created the exact same Hello World application using Swing, and it resulted in a 1286 byte class file. Wow! :-) Examining the jar from the JavaFX version, it seems it will also only run on Linux, because it included Linux native *.so files for GTK2 and GTK3, and some font handling FreeType library. So I would have to compile separate jars for each platform, or try and figure out how to build a true "fat jar" for all platforms. :-( The fact that now my Java application will only run on Linux completely goes against what attracted me to Java in the first place. Compile once, Run everywhere! So I'll stick with Swing for as long as I possibly can. Regards, Graeme