<div dir="ltr">I use this in a gradle project I have and it works for me. All the OS-specific modules are packaged and I can run the app on all 3 desktop platforms.<div><br></div><div>It seems that you are doing something more special. Maybe someone else has insights.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 20, 2022 at 8:03 PM Thomas Reinhardt <<a href="mailto:thomas.reinhardt@s4p.de">thomas.reinhardt@s4p.de</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"><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" rel="noreferrer" target="_blank">https://openjfx.io/openjfx-docs/#introduction</a> <br>
> <<a href="https://openjfx.io/openjfx-docs/#introduction" rel="noreferrer" target="_blank">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>
> <<a href="mailto:thomas.reinhardt@s4p.de" target="_blank">thomas.reinhardt@s4p.de</a> <mailto:<a href="mailto:thomas.reinhardt@s4p.de" target="_blank">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>
> <br>
</blockquote></div>