<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";color:#212121">Thomas:</span><span style="color:#212121"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New";color:#212121"> </span><span style="color:#212121"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New";color:#212121">if your installer can change the command line it uses to launch java, you could modify the classpath to point to a subdirectory or a set of platform-specific jars. 
 do you think this might work?</span><span style="color:#212121"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New";color:#212121"> </span><span style="color:#212121"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New";color:#212121">-andy</span><span style="color:#212121"><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""><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 Thomas Reinhardt <thomas.reinhardt@s4p.de><br>
<b>Date: </b>Thursday, 2022/10/20 at 10: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"><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 the <br>
same.<br>
<br>
What would be needed is<br>
<br>
Either: a class "javafx.scene.web.WebEngine" that is only a thin wrapper <br>
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 with <br>
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 link <br>
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 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 is <br>
> 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 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 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 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 that does<br>
>     not solve the issue.<br>
> <br>
>     Ideally I would use something like -Djavafx.platform=all but that does<br>
>     not exist.<br>
> <br>
>     My question is: is there an existing solution where I can just 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 solution and<br>
>     not implement some workaround.<br>
> <br>
>     If there is no solution (yet), is there interest in such a 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>