I use jlink and jpackage to distribute JavaFX applications.
You suggest there will be a problem if you use jlink, but it will work if you 
include the needed javafx modules. The .jmod files contain the necessary native 
libraries and jlink will build a JRE that has the DLLs in the right place for 
the runtime to find them.

Modifying your PATH is not the right way to do this. Distributing a runtime 
with your application is the right way to solve this. The jlink and jpackage 
tools make this fairly easy.  I use a custom Gradle script to bundle my 
application, it works well.

Scott

> On Apr 17, 2020, at 2:55 PM, Christopher Miles <twi...@nervestaple.com> wrote:
> 
> I manage a project[0]  that leverages JavaFX. It's been a while since I've 
> worked on this project, almost two years. At that time JavaFX was bundled 
> with the Java runtime from Oracle. The few customers I had would simply run 
> the application from the bundled launcher and as long as they had Java 
> installed, it would work.
> 
> It's time for me to add some features to the project, I am now using OpenJDK 
> 14.0.1 and I installed the OpenJavaFX package and followed the 
> instructions[1] from the following URL:
> 
> https://openjfx.io/openjfx-docs/#install-javafx
> 
> I am on Windows and followed the instructions for that platform. 
> Unfortunately, things didn't really work. The error was as follows:
> 
> Graphics Device initialization failed for : d3d, sw Error initializing 
> QuantumRenderer: no suitable pipeline found java.lang.RuntimeException: 
> java.lang.RuntimeException: Error initializing QuantumRend erer: no suitable 
> pipeline found at 
> javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(Unkno 
> wn Source)
> 
> I fussed with this and that but nothing made a difference. Eventually I tried 
> adding the "bin" directory from the JavaFX distribution to my path. This is 
> the entry I added to my global PATH variable:
> 
> C:\Program Files\Java\javafx-sdk-14\bin
> 
> Is this the right way to do this and, if so, why isn't this included in the 
> directions? Is this a Windows specific issue?
> 
> Also, what impact does this have on distribution of applications?
> 
> Looking at the "Runtime Images" instructions, it looks like the same issues 
> will be present. Those instructions use `jlink` to point to the JavaFX 
> libraries and the JAVAFX modules (distributed in another package) but also 
> leave off references to the DLL files in the "bin" directory. I am worried 
> that I will need to have people manually install the OpenJavaFX distribution 
> and add the "bin" directory to their path in order to run my application. 
> Please say it's not so!
> 
> Any help or pointers to additional documentation would be very much 
> appreciated! I have made it over the bumps and can now continue development 
> of my application, my next concern is distributing it to customers.
> 
> -- 
> Miles
> 
> [0]: https://github.com/cmiles74/xmltool
> [1]: https://openjfx.io/openjfx-docs/#install-javafx

Reply via email to