<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="auto">
<div dir="auto"><br>
</div>
<div dir="auto">Hi Andy,</div>
<div dir="auto"><br>
</div>
<div dir="auto">This is actually a good suggestion. There are compatibility issues with existing installations (end users could change the commandline/arguments). I will have to check.</div>
<div dir="auto"><br>
</div>
<div dir="auto">        - Thomas</div>
<div><br>
<br>
<div data-smartmail="gmail_signature">Mit freundlichen Grüßen,<br>
<br>
Thomas Reinhardt</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">Am 20.10.2022 19:12 schrieb Andy Goryachev <andy.goryachev@oracle.com>:<br type="attribution">
<blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">
<div>
<p><span style="font-size:11pt;font-family:'courier new';color:#212121">Thomas:</span><span style="color:#212121"></span></p>
<p><span style="font-size:11pt;font-family:'courier new';color:#212121"> </span><span style="color:#212121"></span></p>
<p><span style="font-size:11pt;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"></span></p>
<p><span style="font-size:11pt;font-family:'courier new';color:#212121"> </span><span style="color:#212121"></span></p>
<p><span style="font-size:11pt;font-family:'courier new';color:#212121">-andy</span><span style="color:#212121"></span></p>
<p><span style="font-size:11pt;font-family:'courier new'"> </span></p>
<p><span style="font-size:11pt;font-family:'courier new'"> </span></p>
<div style="border:none;border-top:solid #b5c4df 1pt;padding:3pt 0in 0in 0in">
<p style="margin-bottom:12pt"><b><span style="font-size:12pt;color:black">From: </span>
</b><span style="font-size:12pt;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</span></p>
</div>
<div>
<p><span style="font-size:11pt"><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>
> </span></p>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</body>
</html>