<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Times New Roman \(Body CS\)";
        panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Courier New";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">Good point - are we packaging platform-specific javafx parts incorrectly?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">-andy<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">openjfx-dev <openjfx-dev-retn@openjdk.org> on behalf of John Hendrikx <john.hendrikx@gmail.com><br>
<b>Date: </b>Thursday, 2022/10/20 at 13:03<br>
<b>To: </b>openjfx-dev@openjdk.org <openjfx-dev@openjdk.org><br>
<b>Subject: </b>Re: Platform independent deployment<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">Correct me if I'm wrong, but all the classes in the artifacts for win,
<br>
linux and mac are actually exactly the same -- this is Java code after <br>
all, why would all Java classes for a platform be platform specific?  It <br>
doesn't matter which one is packaged.  The platform specific stuff lives <br>
in the native libraries -- my shaded jar just includes all of them for <br>
all platforms (dll for windows, so for linux, dylib for mac).  I'm <br>
pretty sure I used this exact same jar to run my software on windows and <br>
linux.  Never tested mac as I don't own one.<br>
<br>
My pom therefore includes all three, like Nir Lisker has, and my shaded <br>
artifact just packages them all (I get a lot of warnings about duplicate <br>
classes, but those can just be ignored).<br>
<br>
--John<br>
<br>
On 20/10/2022 19:03, Thomas Reinhardt wrote:<br>
><br>
> Hi Nir,<br>
><br>
> Does not work (I testet it) and it can not work (see below).<br>
><br>
> Also, this is exactly what my naive test was (I did not use maven to <br>
> copy the artifacts, but the result obviously is the same).<br>
><br>
> It can not work as the implementation classes have the same name and <br>
> thus the jre can not distinguish which one to load. For example both <br>
> javafx-web-18-win and javafx-web-18-linux define a class <br>
> "javafx.scene.web.WebEngine". From the jre's point of view they are <br>
> the same.<br>
><br>
> What would be needed is<br>
><br>
> Either: a class "javafx.scene.web.WebEngine" that is only a thin <br>
> wrapper to javafx.scene.web.linux.WebEngine.<br>
><br>
> Or: a class that loads only one of the implementations during <br>
> application startup (technically it could load both implementations <br>
> with different classloaders, but lets not go there).<br>
><br>
> There might be other solutions but I am not aware of any.<br>
><br>
><br>
> I was looking for a help forum but did only find the #introduction <br>
> link you mentioned.<br>
><br>
><br>
>     -Thomas<br>
><br>
><br>
><br>
> On 20/10/2022 17:52, Nir Lisker wrote:<br>
>> Hi Thomas,<br>
>><br>
>> Did you try to just specify the platform-specific dependencies in the <br>
>> POM?<br>
>><br>
>>      <dependency><br>
>>          <groupId>org.openjfx</groupId><br>
>>          <artifactId>javafx-graphics</artifactId><br>
>>          <version>19</version><br>
>>          <classifier>win</classifier><br>
>>      </dependency><br>
>>      <dependency><br>
>>          <groupId>org.openjfx</groupId><br>
>>          <artifactId>javafx-graphics</artifactId><br>
>>          <version>19</version><br>
>>          <classifier>linux</classifier><br>
>>      </dependency><br>
>>      <dependency><br>
>>          <groupId>org.openjfx</groupId><br>
>>          <artifactId>javafx-graphics</artifactId><br>
>>          <version>19</version><br>
>>          <classifier>mac</classifier><br>
>>      </dependency><br>
>><br>
>> Seems more of a question for help forums, though if this information <br>
>> is not mentioned in <a href="https://openjfx.io/openjfx-docs/#introduction">https://openjfx.io/openjfx-docs/#introduction</a>
<br>
>> <<a href="https://openjfx.io/openjfx-docs/#introduction">https://openjfx.io/openjfx-docs/#introduction</a>>, it might be worth
<br>
>> adding it.<br>
>><br>
>> On Thu, Oct 20, 2022 at 9:42 AM Thomas Reinhardt <br>
>> <thomas.reinhardt@s4p.de <<a href="mailto:thomas.reinhardt@s4p.de">mailto:thomas.reinhardt@s4p.de</a>>> wrote:<br>
>><br>
>><br>
>>     Hi!<br>
>><br>
>>     Apologizes if this is not the proper list to ask my question.<br>
>><br>
>>     For context: we are using the WebView of JavaFX in our legacy swing<br>
>>     based frontend application. For now that is the only component we <br>
>> are<br>
>>     using but we might migrate completely at a later point in time.<br>
>><br>
>>     I have an issue with the way platform dependent dependencies are<br>
>>     handled. We are using maven btw.<br>
>>     My understanding is that during the build a profile is selected<br>
>>     based on<br>
>>     the host os name and architecture. That profile then sets a property<br>
>>     (javafx.platform) that is in turn used as the classifier for <br>
>> platform<br>
>>     dependent dependencies.<br>
>>     (Offtopic to my question: eclipse warns that the profile ids are not<br>
>>     unique in the org.openjfx:javafx pom.xml).<br>
>><br>
>>     Which means that the result of my build is locked to a single <br>
>> platform.<br>
>>     But we have customers for windows and linux and don't want to have<br>
>>     separate artifacts as that would mean we also have to handle that<br>
>>     distinction in our installer etc.<br>
>><br>
>>     I know I can override the automatically detected platform but <br>
>> that does<br>
>>     not solve the issue.<br>
>><br>
>>     Ideally I would use something like -Djavafx.platform=all but that <br>
>> does<br>
>>     not exist.<br>
>><br>
>>     My question is: is there an existing solution where I can just <br>
>> include<br>
>>     all platform dependencies for say windows and linux and the runtime<br>
>>     "sorts it out"? A naive test (manual copying of artifacts) of mine<br>
>>     unfortunately failed. Of course I could just use custom classloaders<br>
>>     and<br>
>>     do it myself but I really would prefer to use an existing <br>
>> solution and<br>
>>     not implement some workaround.<br>
>><br>
>>     If there is no solution (yet), is there interest in such a <br>
>> feature? We<br>
>>     might be able to contribute to the project.<br>
>><br>
>><br>
>>     -Thomas<br>
>><o:p></o:p></span></p>
</div>
</div>
</body>
</html>