I really appreciate all of the helpful comments in this thread! I have made a lot of progress on this issue, I can compile and run my application and am working on packaging.

In my opinion, my big problem was that when I was compiling I wasn't setting the correct flags with `javac` and, at the same time, probably didn't have the correct flags for `java` either. To be honest I was mostly button mashing at that point in the hopes that I'd stumble across the correct combination.

To get everything working I have moved to using the "mods" with `javac` and to compile and then using `jlink` build an image. After `jlink` runs I am using the `java` that is in the image directory to run the compiled "JAR" file and that is working well.

I think one big hurdle here was my lack of familiarity with Java modules and how they work. While I knew that Java modules had been a thing for a while I've been working on non-Java projects and it was not at the front of my mind.

While the examples on the JavaFX "Getting Started" page worked for me, I don't think I came away with a clear understanding of what the flags where actually doing and that made it a little harder to migrate that information over to my own project. My thinking is that using the "mods" will make it easier to eventually get my application packaged but I'm not entirely clear on the bit about the JavaFX runtime and if I need it at all. I don't think a discussion of the Java modules system would be appropriate on the "Getting Started" page, but maybe getting a little more into the details of which approach makes the most sense (mods vs. the SDK) in which situations would clarify some things.

Thank you all for your help on this! :-)

--
Miles

Kevin Rushforth wrote on 4/20/2020 11:19:
That shouldn't be necessary. It's a better workaround than setting the PATH env variable to be sure, but there is some underlying problem that isn't yet understood.

-- Kevin

On 4/20/2020 8:13 AM, David Grieve wrote:
Set  -Djava.library.path= C:\Program Files\Java\javafx-sdk-14\bin

For the jlink question, look at jmod. You'll use jmod to bundle up the dll's and whatever else you need, then jlink to create the custom runtime.

-----Original Message-----
From: openjfx-dev <openjfx-dev-boun...@openjdk.java.net> On Behalf Of Christopher Miles
Sent: Friday, April 17, 2020 2:56 PM
To: openjfx-dev@openjdk.java.net
Subject: [EXTERNAL] Windows Installation Instructions, All DLL Files Missing

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