Re: Windows Installation Instructions, All DLL Files Missing

2020-04-20 Thread Christopher Miles
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  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






Re: Windows Installation Instructions, All DLL Files Missing

2020-04-20 Thread Kevin Rushforth
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  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




RE: Windows Installation Instructions, All DLL Files Missing

2020-04-20 Thread David Grieve
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  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


Re: Windows Installation Instructions, All DLL Files Missing

2020-04-20 Thread Kevin Rushforth

Can you try running your app with the following two flags?

java -Djavafx.verbose=true -Dprism.verbose=true

That might help diagnose the problem.

-- Kevin


On 4/18/2020 11:18 AM, Christopher Miles wrote:

Yep, that's where I downloaded it from.

> PS C:\Users\cmiles\source\repos\xmltool> java --version
> openjdk 14.0.1 2020-04-14
> OpenJDK Runtime Environment (build 14.0.1+7)
> OpenJDK 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)

When I look at the "bin" directory that came with the JavaFX SDK and 
compare it to the "bin" directory that comes with OpenJDK there are 
things in the JavaFX distribution that aren't present in the OpenJDK 
distribution. These three caught my attention:


  + prism_common.dll
  + prism_d3d.dll
  + prism_sw.dll

I suspect missing these DLL's is what is causing the exception when I 
try to launch my application.


I took a look at "JDK-8207015" and I don't think that is my problem, 
yet. It could be that if the "prism_xxx.dll" files were present, I 
might run into this issue.


I changed my `jlink` command to point at the "mods" as this seems like 
the correct way to do this. Still, the app refuses to launch with the 
same error message.


> Graphics Device initialization failed for :  d3d, sw
> Error initializing QuantumRenderer: no suitable pipeline found
> java.lang.RuntimeException: java.lang.RuntimeException: Error 
initializing QuantumRenderer: no suitable pipeline found


I would very much like to avoid adding switches to a `java` invocation 
in order to run the application. In your example, I would need to have 
customer installed the JavaFX JDK to a specific location in order for 
that to work. I'd also need to have some kind of wrapper to handle 
other operating systems, like Linux or OS X. My goal is to distribute 
one package with custom launching scripts (i.e. one for batch, 
Powershell, and Linux/OS X shell) as I did under Java 8. This makes me 
think that using `jlink` with the mods is the way to go, as long as I 
can figure out why that is not working.


Thank you for your help with this. :-)

Kevin Rushforth wrote on 4/17/2020 17:34:
 From where are you getting your OpenJDK build? 
https://jdk.java.net/14 ? Somewhere else?


-- Kevin


On 4/17/2020 2:16 PM, Christopher Miles wrote:
Yeah, I've tried it with both. The instructions on the JavaFX page 
tell you to add the "lib" directory to the `javac` path and the 
"mods" to the `jlink` path. I figured, since nothing is working, why 
not try them the other way around? In all cases the results are the 
same.


I'm using OpenJDK, wouldn't that project have the same issue 
distributing these DLL files? I would bet they would, since they are 
also an open source project. I can run Swing projects, however, 
without these DLL files.


I can give the Oracle JDK a try. I had been shying away from it 
since OpenJDK is getting to be so popular. If that works, I will let 
the list know.


As an aside, the JavaFX home page recommends using OpenJDK right now:

  https://openjfx.io/openjfx-docs/#install-java

Thank you!

Kevin Rushforth wrote on 4/17/2020 16:51:
Where are you getting JDK 14.0.1 from? Does it include the 
Microsoft VS2017 DLLs and Windows SDK DLLs in jdk-14.0.1/bin? There 
are 45 of them (40 of them are of the form api-ms-win-*.dll). The 
JavaFX 14.0.1 sdk includes them, but the jmods do not. See 
JDK-8207015 [1] for why not. If the JDK has them, then there should 
be no problem running a jlinked app.


One possible problem is that your jlink line is wrong. You should 
not point to the SDK at all when running jlink. Use the jmods with 
jlink (don't use the sdk). Use the sdk with javac and java 
--module-path (don't use the jmods at all).


Btw, even if you are running a JDK that for some reason doesn't 
have the Microsoft DLLs, you should still be able to run using the 
SDK (directly, not via jlink, which requires the jmods) as follows:


java --module-path "C:\Program Files\Java\javafx-sdk-14\lib" 
--add-modules 
javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web 
MyApplication


If this doesn't work without you putting javafx-sdk-14/bin in your 
PATH then something else is wrong.


-- Kevin

[1] https://bugs.openjdk.java.net/browse/JDK-8207015

On 4/17/2020 1:18 PM, Christopher Miles wrote:
I have downloaded both the "mods" and the SDK. I put them 
alongside the JDK on my workstation.


  C:\Program Files\Java\jdk-14.0.1
  C:\Program Files\Java\javafx-sdk-14
  C:\Program Files\Java\javafx-jmods-14.0.1

If I remove the path `C:\Program Files\Java\javafx-sdk-14\bin` and 
point`jlink` at the `C:\Program Files\Java\javafx-jmods-14.0.1` 
path...


jlink --module-path "C:\Program 
Files\Java\javafx-sdk-14\lib;C:\Program 
Files\Java\jdk-14.0.1/jmods" --add-modules 
javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web,java.sql,java.base 
--output C:\Users\cmiles\source\repos\xmltool\target/jlink 
--strip-debug --no-man-pages 

Re: Windows Installation Instructions, All DLL Files Missing

2020-04-19 Thread Michael Paus

Yes, that's what I use in my example together with jlink and jpackage.

Am 20.04.20 um 03:55 schrieb Eric Bresie:

Would jdeps help to see what dependencies are needed?

Eric Bresie
ebre...@gmail.com

On April 18, 2020 at 1:44:43 PM CDT, Michael Paus  wrote:
Hi Christopher,
I do not know what your specific problem is but maybe you just have to
shift your goals a little bit.
Continuing like you did in the Java 8 days is not a good idea for
various reasons. The current trend
for distributing desktop software with Java is to build a platform
specific installer. The tools for that
are all there. Just give it a try. Together with Dirk Lemmermann I have
set up a working example
and tutorial on GitHub. It uses the latest Java/JavaFX and works on Mac
and Windows (should also work
on Linux but I haven't tested it.)

The nice thing about this approach is that your customer does not have
to have anything installed on his
own machine. He can just install your software like he would install any
other piece of software.
Michael

Am 18.04.20 um 20:18 schrieb Christopher Miles:

Yep, that's where I downloaded it from.


PS C:\Users\cmiles\source\repos\xmltool> java --version
openjdk 14.0.1 2020-04-14
OpenJDK Runtime Environment (build 14.0.1+7)
OpenJDK 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)

When I look at the "bin" directory that came with the JavaFX SDK and
compare it to the "bin" directory that comes with OpenJDK there are
things in the JavaFX distribution that aren't present in the OpenJDK
distribution. These three caught my attention:

+ prism_common.dll
+ prism_d3d.dll
+ prism_sw.dll

I suspect missing these DLL's is what is causing the exception when I
try to launch my application.

I took a look at "JDK-8207015" and I don't think that is my problem,
yet. It could be that if the "prism_xxx.dll" files were present, I
might run into this issue.

I changed my `jlink` command to point at the "mods" as this seems like
the correct way to do this. Still, the app refuses to launch with the
same error message.


Graphics Device initialization failed for : d3d, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error

initializing QuantumRenderer: no suitable pipeline found

I would very much like to avoid adding switches to a `java` invocation
in order to run the application. In your example, I would need to have
customer installed the JavaFX JDK to a specific location in order for
that to work. I'd also need to have some kind of wrapper to handle
other operating systems, like Linux or OS X. My goal is to distribute
one package with custom launching scripts (i.e. one for batch,
Powershell, and Linux/OS X shell) as I did under Java 8. This makes me
think that using `jlink` with the mods is the way to go, as long as I
can figure out why that is not working.

Thank you for your help with this. :-)

Kevin Rushforth wrote on 4/17/2020 17:34:

 From where are you getting your OpenJDK build?
https://jdk.java.net/14 ? Somewhere else?

-- Kevin


On 4/17/2020 2:16 PM, Christopher Miles wrote:

Yeah, I've tried it with both. The instructions on the JavaFX page
tell you to add the "lib" directory to the `javac` path and the
"mods" to the `jlink` path. I figured, since nothing is working, why
not try them the other way around? In all cases the results are the
same.

I'm using OpenJDK, wouldn't that project have the same issue
distributing these DLL files? I would bet they would, since they are
also an open source project. I can run Swing projects, however,
without these DLL files.

I can give the Oracle JDK a try. I had been shying away from it
since OpenJDK is getting to be so popular. If that works, I will let
the list know.

As an aside, the JavaFX home page recommends using OpenJDK right now:

https://openjfx.io/openjfx-docs/#install-java

Thank you!

Kevin Rushforth wrote on 4/17/2020 16:51:

Where are you getting JDK 14.0.1 from? Does it include the
Microsoft VS2017 DLLs and Windows SDK DLLs in jdk-14.0.1/bin? There
are 45 of them (40 of them are of the form api-ms-win-*.dll). The
JavaFX 14.0.1 sdk includes them, but the jmods do not. See
JDK-8207015 [1] for why not. If the JDK has them, then there should
be no problem running a jlinked app.

One possible problem is that your jlink line is wrong. You should
not point to the SDK at all when running jlink. Use the jmods with
jlink (don't use the sdk). Use the sdk with javac and java
--module-path (don't use the jmods at all).

Btw, even if you are running a JDK that for some reason doesn't
have the Microsoft DLLs, you should still be able to run using the
SDK (directly, not via jlink, which requires the jmods) as follows:

java --module-path "C:\Program Files\Java\javafx-sdk-14\lib"
--add-modules
javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web
MyApplication

If this doesn't work without you putting java

Re: Re: Windows Installation Instructions, All DLL Files Missing

2020-04-19 Thread Eric Bresie
Would jdeps help to see what dependencies are needed?

Eric Bresie
ebre...@gmail.com
> On April 18, 2020 at 1:44:43 PM CDT, Michael Paus  wrote:
> Hi Christopher,
> I do not know what your specific problem is but maybe you just have to
> shift your goals a little bit.
> Continuing like you did in the Java 8 days is not a good idea for
> various reasons. The current trend
> for distributing desktop software with Java is to build a platform
> specific installer. The tools for that
> are all there. Just give it a try. Together with Dirk Lemmermann I have
> set up a working example
> and tutorial on GitHub. It uses the latest Java/JavaFX and works on Mac
> and Windows (should also work
> on Linux but I haven't tested it.)
> 
> The nice thing about this approach is that your customer does not have
> to have anything installed on his
> own machine. He can just install your software like he would install any
> other piece of software.
> Michael
>
> Am 18.04.20 um 20:18 schrieb Christopher Miles:
> > Yep, that's where I downloaded it from.
> >
> > > PS C:\Users\cmiles\source\repos\xmltool> java --version
> > > openjdk 14.0.1 2020-04-14
> > > OpenJDK Runtime Environment (build 14.0.1+7)
> > > OpenJDK 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)
> >
> > When I look at the "bin" directory that came with the JavaFX SDK and
> > compare it to the "bin" directory that comes with OpenJDK there are
> > things in the JavaFX distribution that aren't present in the OpenJDK
> > distribution. These three caught my attention:
> >
> > + prism_common.dll
> > + prism_d3d.dll
> > + prism_sw.dll
> >
> > I suspect missing these DLL's is what is causing the exception when I
> > try to launch my application.
> >
> > I took a look at "JDK-8207015" and I don't think that is my problem,
> > yet. It could be that if the "prism_xxx.dll" files were present, I
> > might run into this issue.
> >
> > I changed my `jlink` command to point at the "mods" as this seems like
> > the correct way to do this. Still, the app refuses to launch with the
> > same error message.
> >
> > > Graphics Device initialization failed for : d3d, sw
> > > Error initializing QuantumRenderer: no suitable pipeline found
> > > java.lang.RuntimeException: java.lang.RuntimeException: Error
> > initializing QuantumRenderer: no suitable pipeline found
> >
> > I would very much like to avoid adding switches to a `java` invocation
> > in order to run the application. In your example, I would need to have
> > customer installed the JavaFX JDK to a specific location in order for
> > that to work. I'd also need to have some kind of wrapper to handle
> > other operating systems, like Linux or OS X. My goal is to distribute
> > one package with custom launching scripts (i.e. one for batch,
> > Powershell, and Linux/OS X shell) as I did under Java 8. This makes me
> > think that using `jlink` with the mods is the way to go, as long as I
> > can figure out why that is not working.
> >
> > Thank you for your help with this. :-)
> >
> > Kevin Rushforth wrote on 4/17/2020 17:34:
> > > From where are you getting your OpenJDK build?
> > > https://jdk.java.net/14 ? Somewhere else?
> > >
> > > -- Kevin
> > >
> > >
> > > On 4/17/2020 2:16 PM, Christopher Miles wrote:
> > > > Yeah, I've tried it with both. The instructions on the JavaFX page
> > > > tell you to add the "lib" directory to the `javac` path and the
> > > > "mods" to the `jlink` path. I figured, since nothing is working, why
> > > > not try them the other way around? In all cases the results are the
> > > > same.
> > > >
> > > > I'm using OpenJDK, wouldn't that project have the same issue
> > > > distributing these DLL files? I would bet they would, since they are
> > > > also an open source project. I can run Swing projects, however,
> > > > without these DLL files.
> > > >
> > > > I can give the Oracle JDK a try. I had been shying away from it
> > > > since OpenJDK is getting to be so popular. If that works, I will let
> > > > the list know.
> > > >
> > > > As an aside, the JavaFX home page recommends using OpenJDK right now:
> > > >
> > > > https://openjfx.io/openjfx-docs/#install-java
> > > >
> > > > Thank you!
> > > >
> > > > Kevin Rushforth wrote on 4/17/2020 16:51:
> > > > > Where are you getting JDK 14.0.1 from? Does it include the
> > > > > Microsoft VS2017 DLLs and Windows SDK DLLs in jdk-14.0.1/bin? There
> > > > > are 45 of them (40 of them are of the form api-ms-win-*.dll). The
> > > > > JavaFX 14.0.1 sdk includes them, but the jmods do not. See
> > > > > JDK-8207015 [1] for why not. If the JDK has them, then there should
> > > > > be no problem running a jlinked app.
> > > > >
> > > > > One possible problem is that your jlink line is wrong. You should
> > > > > not point to the SDK at all when running jlink. Use the jmods with
> > > > > jlink (don't use the sdk). Use the sdk with javac and java
> > > > > --module-path (don't use the jmods at all).
> > > > >
>

Re: Windows Installation Instructions, All DLL Files Missing

2020-04-18 Thread Michael Paus

Hi Christopher,
I do not know what your specific problem is but maybe you just have to 
shift your goals a little bit.
Continuing like you did in the Java 8 days is not a good idea for 
various reasons. The current trend
for distributing desktop software with Java is to build a platform 
specific installer. The tools for that
are all there. Just give it a try. Together with Dirk Lemmermann I have 
set up a working example
and tutorial on GitHub. It uses the latest Java/JavaFX and works on Mac 
and Windows (should also work
on Linux but I haven't tested it.) 

The nice thing about this approach is that your customer does not have 
to have anything installed on his
own machine. He can just install your software like he would install any 
other piece of software.

Michael

Am 18.04.20 um 20:18 schrieb Christopher Miles:

Yep, that's where I downloaded it from.

> PS C:\Users\cmiles\source\repos\xmltool> java --version
> openjdk 14.0.1 2020-04-14
> OpenJDK Runtime Environment (build 14.0.1+7)
> OpenJDK 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)

When I look at the "bin" directory that came with the JavaFX SDK and 
compare it to the "bin" directory that comes with OpenJDK there are 
things in the JavaFX distribution that aren't present in the OpenJDK 
distribution. These three caught my attention:


  + prism_common.dll
  + prism_d3d.dll
  + prism_sw.dll

I suspect missing these DLL's is what is causing the exception when I 
try to launch my application.


I took a look at "JDK-8207015" and I don't think that is my problem, 
yet. It could be that if the "prism_xxx.dll" files were present, I 
might run into this issue.


I changed my `jlink` command to point at the "mods" as this seems like 
the correct way to do this. Still, the app refuses to launch with the 
same error message.


> Graphics Device initialization failed for :  d3d, sw
> Error initializing QuantumRenderer: no suitable pipeline found
> java.lang.RuntimeException: java.lang.RuntimeException: Error 
initializing QuantumRenderer: no suitable pipeline found


I would very much like to avoid adding switches to a `java` invocation 
in order to run the application. In your example, I would need to have 
customer installed the JavaFX JDK to a specific location in order for 
that to work. I'd also need to have some kind of wrapper to handle 
other operating systems, like Linux or OS X. My goal is to distribute 
one package with custom launching scripts (i.e. one for batch, 
Powershell, and Linux/OS X shell) as I did under Java 8. This makes me 
think that using `jlink` with the mods is the way to go, as long as I 
can figure out why that is not working.


Thank you for your help with this. :-)

Kevin Rushforth wrote on 4/17/2020 17:34:
 From where are you getting your OpenJDK build? 
https://jdk.java.net/14 ? Somewhere else?


-- Kevin


On 4/17/2020 2:16 PM, Christopher Miles wrote:
Yeah, I've tried it with both. The instructions on the JavaFX page 
tell you to add the "lib" directory to the `javac` path and the 
"mods" to the `jlink` path. I figured, since nothing is working, why 
not try them the other way around? In all cases the results are the 
same.


I'm using OpenJDK, wouldn't that project have the same issue 
distributing these DLL files? I would bet they would, since they are 
also an open source project. I can run Swing projects, however, 
without these DLL files.


I can give the Oracle JDK a try. I had been shying away from it 
since OpenJDK is getting to be so popular. If that works, I will let 
the list know.


As an aside, the JavaFX home page recommends using OpenJDK right now:

  https://openjfx.io/openjfx-docs/#install-java

Thank you!

Kevin Rushforth wrote on 4/17/2020 16:51:
Where are you getting JDK 14.0.1 from? Does it include the 
Microsoft VS2017 DLLs and Windows SDK DLLs in jdk-14.0.1/bin? There 
are 45 of them (40 of them are of the form api-ms-win-*.dll). The 
JavaFX 14.0.1 sdk includes them, but the jmods do not. See 
JDK-8207015 [1] for why not. If the JDK has them, then there should 
be no problem running a jlinked app.


One possible problem is that your jlink line is wrong. You should 
not point to the SDK at all when running jlink. Use the jmods with 
jlink (don't use the sdk). Use the sdk with javac and java 
--module-path (don't use the jmods at all).


Btw, even if you are running a JDK that for some reason doesn't 
have the Microsoft DLLs, you should still be able to run using the 
SDK (directly, not via jlink, which requires the jmods) as follows:


java --module-path "C:\Program Files\Java\javafx-sdk-14\lib" 
--add-modules 
javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web 
MyApplication


If this doesn't work without you putting javafx-sdk-14/bin in your 
PATH then something else is wrong.


-- Kevin

[1] https://bugs.openjdk.java.net/browse/JDK-8207015

On 4/17/2020 1:18 PM, Christopher Miles wrote:
I have d

Re: Windows Installation Instructions, All DLL Files Missing

2020-04-18 Thread Christopher Miles

Yep, that's where I downloaded it from.

> PS C:\Users\cmiles\source\repos\xmltool> java --version
> openjdk 14.0.1 2020-04-14
> OpenJDK Runtime Environment (build 14.0.1+7)
> OpenJDK 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)

When I look at the "bin" directory that came with the JavaFX SDK and 
compare it to the "bin" directory that comes with OpenJDK there are 
things in the JavaFX distribution that aren't present in the OpenJDK 
distribution. These three caught my attention:


  + prism_common.dll
  + prism_d3d.dll
  + prism_sw.dll

I suspect missing these DLL's is what is causing the exception when I 
try to launch my application.


I took a look at "JDK-8207015" and I don't think that is my problem, 
yet. It could be that if the "prism_xxx.dll" files were present, I might 
run into this issue.


I changed my `jlink` command to point at the "mods" as this seems like 
the correct way to do this. Still, the app refuses to launch with the 
same error message.


> Graphics Device initialization failed for :  d3d, sw
> Error initializing QuantumRenderer: no suitable pipeline found
> java.lang.RuntimeException: java.lang.RuntimeException: Error 
initializing QuantumRenderer: no suitable pipeline found


I would very much like to avoid adding switches to a `java` invocation 
in order to run the application. In your example, I would need to have 
customer installed the JavaFX JDK to a specific location in order for 
that to work. I'd also need to have some kind of wrapper to handle other 
operating systems, like Linux or OS X. My goal is to distribute one 
package with custom launching scripts (i.e. one for batch, Powershell, 
and Linux/OS X shell) as I did under Java 8. This makes me think that 
using `jlink` with the mods is the way to go, as long as I can figure 
out why that is not working.


Thank you for your help with this. :-)

Kevin Rushforth wrote on 4/17/2020 17:34:
 From where are you getting your OpenJDK build? https://jdk.java.net/14 
? Somewhere else?


-- Kevin


On 4/17/2020 2:16 PM, Christopher Miles wrote:
Yeah, I've tried it with both. The instructions on the JavaFX page 
tell you to add the "lib" directory to the `javac` path and the "mods" 
to the `jlink` path. I figured, since nothing is working, why not try 
them the other way around? In all cases the results are the same.


I'm using OpenJDK, wouldn't that project have the same issue 
distributing these DLL files? I would bet they would, since they are 
also an open source project. I can run Swing projects, however, 
without these DLL files.


I can give the Oracle JDK a try. I had been shying away from it since 
OpenJDK is getting to be so popular. If that works, I will let the 
list know.


As an aside, the JavaFX home page recommends using OpenJDK right now:

  https://openjfx.io/openjfx-docs/#install-java

Thank you!

Kevin Rushforth wrote on 4/17/2020 16:51:
Where are you getting JDK 14.0.1 from? Does it include the Microsoft 
VS2017 DLLs and Windows SDK DLLs in jdk-14.0.1/bin? There are 45 of 
them (40 of them are of the form api-ms-win-*.dll). The JavaFX 14.0.1 
sdk includes them, but the jmods do not. See JDK-8207015 [1] for why 
not. If the JDK has them, then there should be no problem running a 
jlinked app.


One possible problem is that your jlink line is wrong. You should not 
point to the SDK at all when running jlink. Use the jmods with jlink 
(don't use the sdk). Use the sdk with javac and java --module-path 
(don't use the jmods at all).


Btw, even if you are running a JDK that for some reason doesn't have 
the Microsoft DLLs, you should still be able to run using the SDK 
(directly, not via jlink, which requires the jmods) as follows:


java --module-path "C:\Program Files\Java\javafx-sdk-14\lib" 
--add-modules 
javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web 
MyApplication


If this doesn't work without you putting javafx-sdk-14/bin in your 
PATH then something else is wrong.


-- Kevin

[1] https://bugs.openjdk.java.net/browse/JDK-8207015

On 4/17/2020 1:18 PM, Christopher Miles wrote:
I have downloaded both the "mods" and the SDK. I put them alongside 
the JDK on my workstation.


  C:\Program Files\Java\jdk-14.0.1
  C:\Program Files\Java\javafx-sdk-14
  C:\Program Files\Java\javafx-jmods-14.0.1

If I remove the path `C:\Program Files\Java\javafx-sdk-14\bin` and 
point`jlink` at the `C:\Program Files\Java\javafx-jmods-14.0.1` path...


jlink --module-path "C:\Program 
Files\Java\javafx-sdk-14\lib;C:\Program Files\Java\jdk-14.0.1/jmods" 
--add-modules 
javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web,java.sql,java.base 
--output C:\Users\cmiles\source\repos\xmltool\target/jlink 
--strip-debug --no-man-pages --no-header-files --compress=2


...and remove `C:\Program Files\Java\javafx-sdk-14\bin` from my 
global path, the application builds. When I try to run the 
application I see the following error.


  Graphics 

Re: Windows Installation Instructions, All DLL Files Missing

2020-04-17 Thread Kevin Rushforth
From where are you getting your OpenJDK build? https://jdk.java.net/14 
? Somewhere else?


-- Kevin


On 4/17/2020 2:16 PM, Christopher Miles wrote:
Yeah, I've tried it with both. The instructions on the JavaFX page 
tell you to add the "lib" directory to the `javac` path and the "mods" 
to the `jlink` path. I figured, since nothing is working, why not try 
them the other way around? In all cases the results are the same.


I'm using OpenJDK, wouldn't that project have the same issue 
distributing these DLL files? I would bet they would, since they are 
also an open source project. I can run Swing projects, however, 
without these DLL files.


I can give the Oracle JDK a try. I had been shying away from it since 
OpenJDK is getting to be so popular. If that works, I will let the 
list know.


As an aside, the JavaFX home page recommends using OpenJDK right now:

  https://openjfx.io/openjfx-docs/#install-java

Thank you!

Kevin Rushforth wrote on 4/17/2020 16:51:
Where are you getting JDK 14.0.1 from? Does it include the Microsoft 
VS2017 DLLs and Windows SDK DLLs in jdk-14.0.1/bin? There are 45 of 
them (40 of them are of the form api-ms-win-*.dll). The JavaFX 14.0.1 
sdk includes them, but the jmods do not. See JDK-8207015 [1] for why 
not. If the JDK has them, then there should be no problem running a 
jlinked app.


One possible problem is that your jlink line is wrong. You should not 
point to the SDK at all when running jlink. Use the jmods with jlink 
(don't use the sdk). Use the sdk with javac and java --module-path 
(don't use the jmods at all).


Btw, even if you are running a JDK that for some reason doesn't have 
the Microsoft DLLs, you should still be able to run using the SDK 
(directly, not via jlink, which requires the jmods) as follows:


java --module-path "C:\Program Files\Java\javafx-sdk-14\lib" 
--add-modules 
javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web 
MyApplication


If this doesn't work without you putting javafx-sdk-14/bin in your 
PATH then something else is wrong.


-- Kevin

[1] https://bugs.openjdk.java.net/browse/JDK-8207015

On 4/17/2020 1:18 PM, Christopher Miles wrote:
I have downloaded both the "mods" and the SDK. I put them alongside 
the JDK on my workstation.


  C:\Program Files\Java\jdk-14.0.1
  C:\Program Files\Java\javafx-sdk-14
  C:\Program Files\Java\javafx-jmods-14.0.1

If I remove the path `C:\Program Files\Java\javafx-sdk-14\bin` and 
point`jlink` at the `C:\Program Files\Java\javafx-jmods-14.0.1` path...


jlink --module-path "C:\Program 
Files\Java\javafx-sdk-14\lib;C:\Program Files\Java\jdk-14.0.1/jmods" 
--add-modules 
javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web,java.sql,java.base 
--output C:\Users\cmiles\source\repos\xmltool\target/jlink 
--strip-debug --no-man-pages --no-header-files --compress=2


...and remove `C:\Program Files\Java\javafx-sdk-14\bin` from my 
global path, the application builds. When I try to run the 
application I see the following error.


  Graphics Device initialization failed for :  d3d, sw
  Error initializing QuantumRenderer: no suitable pipeline found

Swapping out the mods path for the SDK "lib" directory has, as far 
as I can tell, the exact same effect. :-(


If I add the path `C:\Program Files\Java\javafx-sdk-14\bin` to my 
global PATH then it does run successfully.


I hear what you're saying but this doesn't seem to be the case...

What version of Windows are you using? I don't think this is a 
Windows 10 specific issue but perhaps there is something platform 
specific involved.


Thank you!


Scott Palmer wrote on 4/17/2020 15:23:

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 
 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 wor

Re: Windows Installation Instructions, All DLL Files Missing

2020-04-17 Thread Christopher Miles
Yeah, I've tried it with both. The instructions on the JavaFX page tell 
you to add the "lib" directory to the `javac` path and the "mods" to the 
`jlink` path. I figured, since nothing is working, why not try them the 
other way around? In all cases the results are the same.


I'm using OpenJDK, wouldn't that project have the same issue 
distributing these DLL files? I would bet they would, since they are 
also an open source project. I can run Swing projects, however, without 
these DLL files.


I can give the Oracle JDK a try. I had been shying away from it since 
OpenJDK is getting to be so popular. If that works, I will let the list 
know.


As an aside, the JavaFX home page recommends using OpenJDK right now:

  https://openjfx.io/openjfx-docs/#install-java

Thank you!

Kevin Rushforth wrote on 4/17/2020 16:51:
Where are you getting JDK 14.0.1 from? Does it include the Microsoft 
VS2017 DLLs and Windows SDK DLLs in jdk-14.0.1/bin? There are 45 of them 
(40 of them are of the form api-ms-win-*.dll). The JavaFX 14.0.1 sdk 
includes them, but the jmods do not. See JDK-8207015 [1] for why not. If 
the JDK has them, then there should be no problem running a jlinked app.


One possible problem is that your jlink line is wrong. You should not 
point to the SDK at all when running jlink. Use the jmods with jlink 
(don't use the sdk). Use the sdk with javac and java --module-path 
(don't use the jmods at all).


Btw, even if you are running a JDK that for some reason doesn't have the 
Microsoft DLLs, you should still be able to run using the SDK (directly, 
not via jlink, which requires the jmods) as follows:


java --module-path "C:\Program Files\Java\javafx-sdk-14\lib" 
--add-modules 
javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web 
MyApplication


If this doesn't work without you putting javafx-sdk-14/bin in your PATH 
then something else is wrong.


-- Kevin

[1] https://bugs.openjdk.java.net/browse/JDK-8207015

On 4/17/2020 1:18 PM, Christopher Miles wrote:
I have downloaded both the "mods" and the SDK. I put them alongside 
the JDK on my workstation.


  C:\Program Files\Java\jdk-14.0.1
  C:\Program Files\Java\javafx-sdk-14
  C:\Program Files\Java\javafx-jmods-14.0.1

If I remove the path `C:\Program Files\Java\javafx-sdk-14\bin` and 
point`jlink` at the `C:\Program Files\Java\javafx-jmods-14.0.1` path...


jlink --module-path "C:\Program 
Files\Java\javafx-sdk-14\lib;C:\Program Files\Java\jdk-14.0.1/jmods" 
--add-modules 
javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web,java.sql,java.base 
--output C:\Users\cmiles\source\repos\xmltool\target/jlink 
--strip-debug --no-man-pages --no-header-files --compress=2


...and remove `C:\Program Files\Java\javafx-sdk-14\bin` from my global 
path, the application builds. When I try to run the application I see 
the following error.


  Graphics Device initialization failed for :  d3d, sw
  Error initializing QuantumRenderer: no suitable pipeline found

Swapping out the mods path for the SDK "lib" directory has, as far as 
I can tell, the exact same effect. :-(


If I add the path `C:\Program Files\Java\javafx-sdk-14\bin` to my 
global PATH then it does run successfully.


I hear what you're saying but this doesn't seem to be the case...

What version of Windows are you using? I don't think this is a Windows 
10 specific issue but perhaps there is something platform specific 
involved.


Thank you!


Scott Palmer wrote on 4/17/2020 15:23:

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 
 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 
jav

Re: Windows Installation Instructions, All DLL Files Missing

2020-04-17 Thread Kevin Rushforth
Where are you getting JDK 14.0.1 from? Does it include the Microsoft 
VS2017 DLLs and Windows SDK DLLs in jdk-14.0.1/bin? There are 45 of them 
(40 of them are of the form api-ms-win-*.dll). The JavaFX 14.0.1 sdk 
includes them, but the jmods do not. See JDK-8207015 [1] for why not. If 
the JDK has them, then there should be no problem running a jlinked app.


One possible problem is that your jlink line is wrong. You should not 
point to the SDK at all when running jlink. Use the jmods with jlink 
(don't use the sdk). Use the sdk with javac and java --module-path 
(don't use the jmods at all).


Btw, even if you are running a JDK that for some reason doesn't have the 
Microsoft DLLs, you should still be able to run using the SDK (directly, 
not via jlink, which requires the jmods) as follows:


java --module-path "C:\Program Files\Java\javafx-sdk-14\lib" 
--add-modules 
javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web 
MyApplication


If this doesn't work without you putting javafx-sdk-14/bin in your PATH 
then something else is wrong.


-- Kevin

[1] https://bugs.openjdk.java.net/browse/JDK-8207015

On 4/17/2020 1:18 PM, Christopher Miles wrote:
I have downloaded both the "mods" and the SDK. I put them alongside 
the JDK on my workstation.


  C:\Program Files\Java\jdk-14.0.1
  C:\Program Files\Java\javafx-sdk-14
  C:\Program Files\Java\javafx-jmods-14.0.1

If I remove the path `C:\Program Files\Java\javafx-sdk-14\bin` and 
point`jlink` at the `C:\Program Files\Java\javafx-jmods-14.0.1` path...


jlink --module-path "C:\Program 
Files\Java\javafx-sdk-14\lib;C:\Program Files\Java\jdk-14.0.1/jmods" 
--add-modules 
javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web,java.sql,java.base 
--output C:\Users\cmiles\source\repos\xmltool\target/jlink 
--strip-debug --no-man-pages --no-header-files --compress=2


...and remove `C:\Program Files\Java\javafx-sdk-14\bin` from my global 
path, the application builds. When I try to run the application I see 
the following error.


  Graphics Device initialization failed for :  d3d, sw
  Error initializing QuantumRenderer: no suitable pipeline found

Swapping out the mods path for the SDK "lib" directory has, as far as 
I can tell, the exact same effect. :-(


If I add the path `C:\Program Files\Java\javafx-sdk-14\bin` to my 
global PATH then it does run successfully.


I hear what you're saying but this doesn't seem to be the case...

What version of Windows are you using? I don't think this is a Windows 
10 specific issue but perhaps there is something platform specific 
involved.


Thank you!


Scott Palmer wrote on 4/17/2020 15:23:

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 
 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 modul

Re: Windows Installation Instructions, All DLL Files Missing

2020-04-17 Thread hohonuuli
I build several JavaFX projects with cross-builds for Windows, Mac, Linux. Note 
that I build the projects with Java 11, then use Java 14 packager to build the 
final installer. So my examples require that you set a JPACKAGE_HOME env 
variable that points at the Java 14 home. Anyway, here’s an example project: 
https://github.com/mbari-media-management/vars-query

Cheers

Brian Schlining
Software Engineer
P (831) 775-1855   F (831) 775-1620


Monterey Bay Aquarium Research Institute
7700 Sandholdt Road, Moss Landing CA 95039
www.mbari.org
Advancing marine science and engineering to understand our changing ocean.
On Apr 17, 2020, 11:59 AM -0700, Christopher Miles , 
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


Re: Windows Installation Instructions, All DLL Files Missing

2020-04-17 Thread Christopher Miles
I have downloaded both the "mods" and the SDK. I put them alongside the 
JDK on my workstation.


  C:\Program Files\Java\jdk-14.0.1
  C:\Program Files\Java\javafx-sdk-14
  C:\Program Files\Java\javafx-jmods-14.0.1

If I remove the path `C:\Program Files\Java\javafx-sdk-14\bin` and 
point`jlink` at the `C:\Program Files\Java\javafx-jmods-14.0.1` path...


jlink --module-path "C:\Program Files\Java\javafx-sdk-14\lib;C:\Program 
Files\Java\jdk-14.0.1/jmods" --add-modules 
javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web,java.sql,java.base 
--output C:\Users\cmiles\source\repos\xmltool\target/jlink --strip-debug 
--no-man-pages --no-header-files --compress=2


...and remove `C:\Program Files\Java\javafx-sdk-14\bin` from my global 
path, the application builds. When I try to run the application I see 
the following error.


  Graphics Device initialization failed for :  d3d, sw
  Error initializing QuantumRenderer: no suitable pipeline found

Swapping out the mods path for the SDK "lib" directory has, as far as I 
can tell, the exact same effect. :-(


If I add the path `C:\Program Files\Java\javafx-sdk-14\bin` to my global 
PATH then it does run successfully.


I hear what you're saying but this doesn't seem to be the case...

What version of Windows are you using? I don't think this is a Windows 
10 specific issue but perhaps there is something platform specific involved.


Thank you!


Scott Palmer wrote on 4/17/2020 15:23:

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  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





--
Miles


Re: Windows Installation Instructions, All DLL Files Missing

2020-04-17 Thread Scott Palmer
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  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



Windows Installation Instructions, All DLL Files Missing

2020-04-17 Thread Christopher Miles
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