Re: The "javafx might not be present" problem

2018-02-13 Thread Michael Paus

That is good news and will probably make a lot of things easier.
Michael

Am 13.02.18 um 22:50 schrieb Kevin Rushforth:


There is a big difference because you just don't have to bundle all 
these
other things with the JDK because you can add them later if you need 
them.

This is different from the OpenJDK-OpenJFX combo which has to be built
and distributed together for technical reasons.


We are working to eliminate this dependency, to make it easier for 
OpenJFX to be used with OpenJDK builds that don't already contain 
javafx.* modules.


-- Kevin



Michael Paus wrote:

Am 09.02.18 um 15:22 schrieb Mario Torre:

On Fri, Feb 9, 2018 at 3:07 PM, Michael Paus  wrote:

Am 09.02.18 um 14:49 schrieb Mario Torre:

On Fri, Feb 9, 2018 at 2:29 PM, Mark Raynsford 
wrote:

I suppose what I'm really saying is: When (if ever) can I expect 
JavaFX
to be present unconditionally with OpenJDK installs? I probably 
can't

migrate to JavaFX until that day...

JavaFX is not part of the Java specifications for the JDK or its
runtime, so the presence of the library in any distribution of 
OpenJDK

pretty much depends on the vendor distributing you the binaries.

There are some Linux distribution that started packaging a subset of
OpenJFX (in most cases few notable missing bits are the audio codecs
and the webview). I don't know if the same libraries will be bundled
with the GPL binary from Oracle, that's probably a question somebody
from Oracle may answer.

The only way I can see JavaFX becoming included by default everywhere
is if it becomes part of the spec.
In practice this is really a pain point and very bad advertising 
for JavaFX.
Who defines that everything Open... can only contain what is 
included in

"the spec"?
Who keeps us from creating a product OpenJDKFX which we define to 
contain
OpenJDK + OpenJFX. I'd like to see a complete and open version of 
Java but

at the moment everybody seems to restrict themselves to only OpenJDK.
Even Oracle at their EA download page deliver the open version of 
the JDK
without JavaFX which I simply don't understand and which makes this 
version

of the JDK completely useless to me.

You already have a complete, compliant and open version of Java. The
Java spec and the TCK define what is and what is not Java, and it
doesn't cover JavaFX.

JavaFX can be included by downstream vendors, but that's entirely up
to them, in that regard is not different than bundling Tomcat or maven
with your JDK.
There is a big difference because you just don't have to bundle all 
these
other things with the JDK because you can add them later if you need 
them.

This is different from the OpenJDK-OpenJFX combo which has to be built
and distributed together for technical reasons.






Re: The "javafx might not be present" problem

2018-02-13 Thread Kevin Rushforth



There is a big difference because you just don't have to bundle all these
other things with the JDK because you can add them later if you need 
them.

This is different from the OpenJDK-OpenJFX combo which has to be built
and distributed together for technical reasons.


We are working to eliminate this dependency, to make it easier for 
OpenJFX to be used with OpenJDK builds that don't already contain 
javafx.* modules.


-- Kevin



Michael Paus wrote:

Am 09.02.18 um 15:22 schrieb Mario Torre:

On Fri, Feb 9, 2018 at 3:07 PM, Michael Paus  wrote:

Am 09.02.18 um 14:49 schrieb Mario Torre:

On Fri, Feb 9, 2018 at 2:29 PM, Mark Raynsford 
wrote:

I suppose what I'm really saying is: When (if ever) can I expect 
JavaFX

to be present unconditionally with OpenJDK installs? I probably can't
migrate to JavaFX until that day...

JavaFX is not part of the Java specifications for the JDK or its
runtime, so the presence of the library in any distribution of OpenJDK
pretty much depends on the vendor distributing you the binaries.

There are some Linux distribution that started packaging a subset of
OpenJFX (in most cases few notable missing bits are the audio codecs
and the webview). I don't know if the same libraries will be bundled
with the GPL binary from Oracle, that's probably a question somebody
from Oracle may answer.

The only way I can see JavaFX becoming included by default everywhere
is if it becomes part of the spec.
In practice this is really a pain point and very bad advertising for 
JavaFX.
Who defines that everything Open... can only contain what is 
included in

"the spec"?
Who keeps us from creating a product OpenJDKFX which we define to 
contain
OpenJDK + OpenJFX. I'd like to see a complete and open version of 
Java but

at the moment everybody seems to restrict themselves to only OpenJDK.
Even Oracle at their EA download page deliver the open version of 
the JDK
without JavaFX which I simply don't understand and which makes this 
version

of the JDK completely useless to me.

You already have a complete, compliant and open version of Java. The
Java spec and the TCK define what is and what is not Java, and it
doesn't cover JavaFX.

JavaFX can be included by downstream vendors, but that's entirely up
to them, in that regard is not different than bundling Tomcat or maven
with your JDK.

There is a big difference because you just don't have to bundle all these
other things with the JDK because you can add them later if you need 
them.

This is different from the OpenJDK-OpenJFX combo which has to be built
and distributed together for technical reasons.




Re: The "javafx might not be present" problem

2018-02-09 Thread dalibor topic



On 09.02.2018 21:32, Sven Reimers wrote:

Hi,

so we will need a JSR first and get it added to SE afterwards.

That does not sound very feasible.

Any comments?


JDK 10 is in rampdown phase 2, per 
http://openjdk.java.net/projects/jdk/10/ . No new features would be 
added at this phase.


Java SE 11 JSR is well underway, too: 
https://jcp.org/en/jsr/detail?id=384 . With 6.5 months to go until 
September and the minimal timeline for a new JSR being around 8.5 months 
judging by https://jcp.org/images/resources/2_9gantt.gif adding a whole 
new JSR into JDK 11 might not be quite as simple as it may sound.


Running a JSR for an open source library would not make a lot of sense 
if the sole purpose of that work was to add it to some JDK download. The 
module system already exists.


cheers,
dalibor topic



Sven



Am 09.02.2018 18:53 schrieb "dalibor topic" >:


On 09.02.2018 15:07, Michael Paus wrote:

Who defines that everything Open... can only contain what is
included in "the spec"?


http://openjdk.java.net/projects/jdk/


"The goal of this long-running Project is to produce a series of
open-source reference implementations of the Java SE Platform, as
specified by JSRs in the Java Community Process. "

cheers,
dalibor topic
-- 
 Dalibor Topic | Principal Product Manager

Phone: +494089091214  > | Mobile: +491737185961 
>

ORACLE Deutschland B.V. & Co. KG | Kühnehöfe 5 | 22761 Ham

burg

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstr. 25, D-8
0992
München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher

> Oracle is committed to developing
practices and products that help protect the environment



--
 Dalibor Topic | Principal Product Manager
Phone: +494089091214  | Mobile: +491737185961


ORACLE Deutschland B.V. & Co. KG | Kühnehöfe 5 | 22761 Hamburg

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher

 Oracle is committed to developing
practices and products that help protect the environment


Re: The "javafx might not be present" problem

2018-02-09 Thread dalibor topic



On 09.02.2018 19:28, John Neffenger wrote:

You can comment there if you're interested in seeing support for JavaFX 
be part of the default installation of OpenJDK 9 or 10 on Ubuntu. I'm 
hoping it can get included in time for the next Long Term Support 
release of Ubuntu 18.04 in April.


See https://wiki.ubuntu.com/BionicBeaver/ReleaseSchedule for the 18.04 
release schedule. Feature freeze is coming up on March 1st.


There won't be OpenJDK 9 in 18.04. See 
https://lists.ubuntu.com/archives/ubuntu-release/2018-February/004275.html 
for details.


cheers,
dalibor topic


--
 Dalibor Topic | Principal Product Manager
Phone: +494089091214  | Mobile: +491737185961


ORACLE Deutschland B.V. & Co. KG | Kühnehöfe 5 | 22761 Hamburg

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher

 Oracle is committed to developing
practices and products that help protect the environment


Re: The "javafx might not be present" problem

2018-02-09 Thread Sven Reimers
Hi,

so we will need a JSR first and get it added to SE afterwards.

That does not sound very feasible.

Any comments?

Sven



Am 09.02.2018 18:53 schrieb "dalibor topic" :

> On 09.02.2018 15:07, Michael Paus wrote:
>
>> Who defines that everything Open... can only contain what is included in
>> "the spec"?
>>
>
> http://openjdk.java.net/projects/jdk/
>
> "The goal of this long-running Project is to produce a series of
> open-source reference implementations of the Java SE Platform, as specified
> by JSRs in the Java Community Process. "
>
> cheers,
> dalibor topic
> --
>  Dalibor Topic | Principal Product Manager
> Phone: +494089091214  | Mobile: +491737185961
> 
>
> ORACLE Deutschland B.V. & Co. KG | Kühnehöfe 5 | 22761 Ham
> 
> burg
>
> ORACLE Deutschland B.V. & Co. KG
> Hauptverwaltung: Riesstr. 25, D-8
> 0992
> München
> Registergericht: Amtsgericht München, HRA 95603
>
> Komplementärin: ORACLE Deutschland Verwaltung B.V.
> Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
> Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
> Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
>
>  Oracle is committed to developing
> practices and products that help protect the environment
>


Re: The "javafx might not be present" problem

2018-02-09 Thread Mark Raynsford
On 2018-02-09T10:28:56 -0800
John Neffenger  wrote:
>
> I reported the bug below to fix this same issue for Ubuntu:
> 
> JavaFX support is in Oracle JDK 9 but missing in Ubuntu OpenJDK 9
> https://bugs.launchpad.net/ubuntu/+source/openjdk-9/+bug/1721852
> 
> You can comment there if you're interested in seeing support for JavaFX 
> be part of the default installation of OpenJDK 9 or 10 on Ubuntu. I'm 
> hoping it can get included in time for the next Long Term Support 
> release of Ubuntu 18.04 in April.

I'll be commenting there as I would like to see it fixed. I'd like to
reiterate though that it doesn't solve the problem of:

  * Depending on OpenJFX from library code: You can't specify a
dependency on OpenJFX because it doesn't have Maven coordinates.
OpenJFX occupies a grey area where it's sort of part of the JDK
and sort of not.

  * Using OpenJFX from an application that hasn't been processed
with jlink and is using Java 9 modules: You can't check
reflectively for the existence of JavaFX without mentioning
it in the module system.

The above ticket just reduces the number of places where JavaFX might
not be present by one. I'd prefer a more general solution to this
problem. I am volunteering to help if there's any way that I can help.

-- 
Mark Raynsford | http://www.io7m.com



Re: The "javafx might not be present" problem

2018-02-09 Thread John Neffenger

On 02/09/2018 05:29 AM, Mark Raynsford wrote:

I've been exploring the possibility of migrating to JavaFX on and off,
but the biggest showstopper for me is that JavaFX may not actually be
present in any given user's installation. If someone installs the
jre9-openjdk package on Arch Linux, for example, they don't get JavaFX.


I reported the bug below to fix this same issue for Ubuntu:

JavaFX support is in Oracle JDK 9 but missing in Ubuntu OpenJDK 9
https://bugs.launchpad.net/ubuntu/+source/openjdk-9/+bug/1721852

You can comment there if you're interested in seeing support for JavaFX 
be part of the default installation of OpenJDK 9 or 10 on Ubuntu. I'm 
hoping it can get included in time for the next Long Term Support 
release of Ubuntu 18.04 in April.


John


Re: The "javafx might not be present" problem

2018-02-09 Thread dalibor topic

On 09.02.2018 15:07, Michael Paus wrote:
Who defines that everything Open... can only contain what is included in 
"the spec"?


http://openjdk.java.net/projects/jdk/

"The goal of this long-running Project is to produce a series of 
open-source reference implementations of the Java SE Platform, as 
specified by JSRs in the Java Community Process. "


cheers,
dalibor topic
--
 Dalibor Topic | Principal Product Manager
Phone: +494089091214  | Mobile: +491737185961


ORACLE Deutschland B.V. & Co. KG | Kühnehöfe 5 | 22761 Hamburg

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher

 Oracle is committed to developing
practices and products that help protect the environment


Re: The "javafx might not be present" problem

2018-02-09 Thread Michael Paus

Am 09.02.18 um 15:22 schrieb Mario Torre:

On Fri, Feb 9, 2018 at 3:07 PM, Michael Paus  wrote:

Am 09.02.18 um 14:49 schrieb Mario Torre:

On Fri, Feb 9, 2018 at 2:29 PM, Mark Raynsford 
wrote:


I suppose what I'm really saying is: When (if ever) can I expect JavaFX
to be present unconditionally with OpenJDK installs? I probably can't
migrate to JavaFX until that day...

JavaFX is not part of the Java specifications for the JDK or its
runtime, so the presence of the library in any distribution of OpenJDK
pretty much depends on the vendor distributing you the binaries.

There are some Linux distribution that started packaging a subset of
OpenJFX (in most cases few notable missing bits are the audio codecs
and the webview). I don't know if the same libraries will be bundled
with the GPL binary from Oracle, that's probably a question somebody
from Oracle may answer.

The only way I can see JavaFX becoming included by default everywhere
is if it becomes part of the spec.

In practice this is really a pain point and very bad advertising for JavaFX.
Who defines that everything Open... can only contain what is included in
"the spec"?
Who keeps us from creating a product OpenJDKFX which we define to contain
OpenJDK + OpenJFX. I'd like to see a complete and open version of Java but
at the moment everybody seems to restrict themselves to only OpenJDK.
Even Oracle at their EA download page deliver the open version of the JDK
without JavaFX which I simply don't understand and which makes this version
of the JDK completely useless to me.

You already have a complete, compliant and open version of Java. The
Java spec and the TCK define what is and what is not Java, and it
doesn't cover JavaFX.

JavaFX can be included by downstream vendors, but that's entirely up
to them, in that regard is not different than bundling Tomcat or maven
with your JDK.

There is a big difference because you just don't have to bundle all these
other things with the JDK because you can add them later if you need them.
This is different from the OpenJDK-OpenJFX combo which has to be built
and distributed together for technical reasons.




Re: The "javafx might not be present" problem

2018-02-09 Thread Mario Torre
On Fri, Feb 9, 2018 at 3:07 PM, Michael Paus  wrote:
> Am 09.02.18 um 14:49 schrieb Mario Torre:
>>
>> On Fri, Feb 9, 2018 at 2:29 PM, Mark Raynsford 
>> wrote:
>>
>>> I suppose what I'm really saying is: When (if ever) can I expect JavaFX
>>> to be present unconditionally with OpenJDK installs? I probably can't
>>> migrate to JavaFX until that day...
>>
>> JavaFX is not part of the Java specifications for the JDK or its
>> runtime, so the presence of the library in any distribution of OpenJDK
>> pretty much depends on the vendor distributing you the binaries.
>>
>> There are some Linux distribution that started packaging a subset of
>> OpenJFX (in most cases few notable missing bits are the audio codecs
>> and the webview). I don't know if the same libraries will be bundled
>> with the GPL binary from Oracle, that's probably a question somebody
>> from Oracle may answer.
>>
>> The only way I can see JavaFX becoming included by default everywhere
>> is if it becomes part of the spec.
>
> In practice this is really a pain point and very bad advertising for JavaFX.
> Who defines that everything Open... can only contain what is included in
> "the spec"?
> Who keeps us from creating a product OpenJDKFX which we define to contain
> OpenJDK + OpenJFX. I'd like to see a complete and open version of Java but
> at the moment everybody seems to restrict themselves to only OpenJDK.
> Even Oracle at their EA download page deliver the open version of the JDK
> without JavaFX which I simply don't understand and which makes this version
> of the JDK completely useless to me.

You already have a complete, compliant and open version of Java. The
Java spec and the TCK define what is and what is not Java, and it
doesn't cover JavaFX.

JavaFX can be included by downstream vendors, but that's entirely up
to them, in that regard is not different than bundling Tomcat or maven
with your JDK.

I agree that would be nice to have everywhere, but again I can't see
that happening until it becomes part of the spec.

Cheers,
Mario


Re: The "javafx might not be present" problem

2018-02-09 Thread Mark Raynsford
On 2018-02-09T14:49:23 +0100
Mario Torre  wrote:
>
> JavaFX is not part of the Java specifications for the JDK or its
> runtime, so the presence of the library in any distribution of OpenJDK
> pretty much depends on the vendor distributing you the binaries.

Ah, my mistake then. I thought it actually was part of SE now.

I think I originally misread:

"Starting with Java SE 7 Update 6, JavaFX is part of Oracle's Java SE
implementation."

  https://www.java.com/en/javafx/

I misread that as "Starting with Java SE 7 Update 6, JavaFX is part of
Oracle's Java SE specification."

-- 
Mark Raynsford | http://www.io7m.com



Re: The "javafx might not be present" problem

2018-02-09 Thread Mark Raynsford
On 2018-02-09T13:44:55 +
Johan Vos  wrote:

> Hi Mark,
> 
> Is using jlink (https://docs.oracle.com/javase/9/tools/jlink.htm) packaging
> your app with the exact set of modules you need an option for you?
> That would eliminate the need for your users to have Java installed. Not
> only there is a (small) hurdle to install Java, but it needs to be the
> "correct" version of Java as well, and you would probably expect your users
> to update their JDK with security updates etc.
> 
> I've been a long-time fan of the javapackager, and now that jlink allows
> you to create a custom runtime image, I think we have much better solutions
> than relying on the fact that an end-user installed an ok version of the
> JDK?
> 
> But maybe I'm missing something, and is jlink not an option for you?

'Ello.

Oh, it's certainly an option for applications - if you're willing to
distribute separate platform-specific downloads for each platform. To
date, I've not offered platform-specific downloads for any
applications: Why would I when I can give all users the same
platform-independent jar file?

I'm still investigating coming up with a way to use (or possibly abuse)
jlink to produce a multi-platform distribution so that I still only
offer one single download for all platforms (with some magic scripts or
wrappers that execute the correct included JRE for the platform).

For libraries, it's obviously no help. For libraries, I'd need either a
guarantee that OpenJFX is present wherever a particular version of Java
is, or I'd need Maven coordinates so that the library can specify an
accurate (and automatically resolvable) dependency on JavaFX.

Personally, if a library isn't present on Maven Central, then I don't
even consider depending on it. Being deployed to Maven Central is, for
me, a basic indicator that the project in question is competently
maintained. OpenJFX has elevated status in this regard in that it's not
on Maven Central but I would still consider depending on it if
distribution issues could be solved.

-- 
Mark Raynsford | http://www.io7m.com



Re: The "javafx might not be present" problem

2018-02-09 Thread Stephen Desofi
JEE is not part of the spec but is “in addition to”.Maybe FX should be 
treated the same way with its own standards body.

Maybe even with  it’s own independent platform implementations based on a 
common spec just like JEE.   Hmm.   Thinking out loud here.

Steve

Sent from my iPhone

> On Feb 9, 2018, at 9:07 AM, Michael Paus  wrote:
> 
>> Am 09.02.18 um 14:49 schrieb Mario Torre:
>>> On Fri, Feb 9, 2018 at 2:29 PM, Mark Raynsford  wrote:
>>> 
>>> I suppose what I'm really saying is: When (if ever) can I expect JavaFX
>>> to be present unconditionally with OpenJDK installs? I probably can't
>>> migrate to JavaFX until that day...
>> JavaFX is not part of the Java specifications for the JDK or its
>> runtime, so the presence of the library in any distribution of OpenJDK
>> pretty much depends on the vendor distributing you the binaries.
>> 
>> There are some Linux distribution that started packaging a subset of
>> OpenJFX (in most cases few notable missing bits are the audio codecs
>> and the webview). I don't know if the same libraries will be bundled
>> with the GPL binary from Oracle, that's probably a question somebody
>> from Oracle may answer.
>> 
>> The only way I can see JavaFX becoming included by default everywhere
>> is if it becomes part of the spec.
> In practice this is really a pain point and very bad advertising for JavaFX.
> Who defines that everything Open... can only contain what is included in "the 
> spec"?
> Who keeps us from creating a product OpenJDKFX which we define to contain
> OpenJDK + OpenJFX. I'd like to see a complete and open version of Java but
> at the moment everybody seems to restrict themselves to only OpenJDK.
> Even Oracle at their EA download page deliver the open version of the JDK
> without JavaFX which I simply don't understand and which makes this version
> of the JDK completely useless to me.
> 


Re: The "javafx might not be present" problem

2018-02-09 Thread Michael Paus

Am 09.02.18 um 14:49 schrieb Mario Torre:

On Fri, Feb 9, 2018 at 2:29 PM, Mark Raynsford  wrote:


I suppose what I'm really saying is: When (if ever) can I expect JavaFX
to be present unconditionally with OpenJDK installs? I probably can't
migrate to JavaFX until that day...

JavaFX is not part of the Java specifications for the JDK or its
runtime, so the presence of the library in any distribution of OpenJDK
pretty much depends on the vendor distributing you the binaries.

There are some Linux distribution that started packaging a subset of
OpenJFX (in most cases few notable missing bits are the audio codecs
and the webview). I don't know if the same libraries will be bundled
with the GPL binary from Oracle, that's probably a question somebody
from Oracle may answer.

The only way I can see JavaFX becoming included by default everywhere
is if it becomes part of the spec.

In practice this is really a pain point and very bad advertising for JavaFX.
Who defines that everything Open... can only contain what is included in 
"the spec"?

Who keeps us from creating a product OpenJDKFX which we define to contain
OpenJDK + OpenJFX. I'd like to see a complete and open version of Java but
at the moment everybody seems to restrict themselves to only OpenJDK.
Even Oracle at their EA download page deliver the open version of the JDK
without JavaFX which I simply don't understand and which makes this version
of the JDK completely useless to me.



Re: The "javafx might not be present" problem

2018-02-09 Thread Mario Torre
On Fri, Feb 9, 2018 at 2:29 PM, Mark Raynsford  wrote:

> I suppose what I'm really saying is: When (if ever) can I expect JavaFX
> to be present unconditionally with OpenJDK installs? I probably can't
> migrate to JavaFX until that day...

JavaFX is not part of the Java specifications for the JDK or its
runtime, so the presence of the library in any distribution of OpenJDK
pretty much depends on the vendor distributing you the binaries.

There are some Linux distribution that started packaging a subset of
OpenJFX (in most cases few notable missing bits are the audio codecs
and the webview). I don't know if the same libraries will be bundled
with the GPL binary from Oracle, that's probably a question somebody
from Oracle may answer.

The only way I can see JavaFX becoming included by default everywhere
is if it becomes part of the spec.

Cheers,
Mario


Re: The "javafx might not be present" problem

2018-02-09 Thread Johan Vos
Hi Mark,

Is using jlink (https://docs.oracle.com/javase/9/tools/jlink.htm) packaging
your app with the exact set of modules you need an option for you?
That would eliminate the need for your users to have Java installed. Not
only there is a (small) hurdle to install Java, but it needs to be the
"correct" version of Java as well, and you would probably expect your users
to update their JDK with security updates etc.

I've been a long-time fan of the javapackager, and now that jlink allows
you to create a custom runtime image, I think we have much better solutions
than relying on the fact that an end-user installed an ok version of the
JDK?

But maybe I'm missing something, and is jlink not an option for you?

- Johan

On Fri, Feb 9, 2018 at 2:40 PM Mark Raynsford  wrote:

> Hello!
>
> I've been using Swing for many years. One of the things I like most
> about it is that it's essentially guaranteed to be present in any Java
> SE installation, and although it's a little outdated aesthetically, it
> works well and continues to work well.
>
> I've been exploring the possibility of migrating to JavaFX on and off,
> but the biggest showstopper for me is that JavaFX may not actually be
> present in any given user's installation. If someone installs the
> jre9-openjdk package on Arch Linux, for example, they don't get JavaFX.
> If they install the java-openjfx package, they do (although Arch only
> offers JavaFX 8 right now).
>
> I'm migrating to Java 9 modules, and all new projects will be fully
> modular projects. In the olden days (pre Java 9), it was possible to
> detect if JavaFX was present with a reflection hack:
>
> try {
>   Class jfxPanel = classLoader.loadClass("javafx.embed.swing.JFXPanel");
>   isJavaFxAvailable = true;
> } catch (ClassNotFoundException e) {
>   isJavaFxAvailable = false;
> }
>
> The idea being that you could at least display a friendly error message
> to the user explaining that they need to install JavaFX if they're
> using OpenJDK.
>
> But obviously in a Java 9 project, that's not going to work: You'd need
> to specify a "requires" clause on the JavaFX modules, and if they
> weren't present, the VM wouldn't even start up so the above check
> wouldn't get a chance to run.
>
> For applications, I could probably try to bundle JavaFX with them
> (although there may be licensing issues there). For libraries, I'm out
> of luck. The only apparent option there is for me to pick a set of
> Maven coordinates like "org.openjdk:javafx:8.0" and specify those in my
> libary's POM file (and assume that the user is smart enough to deploy
> JavaFX to a local repos to use it).
>
> I suppose what I'm really saying is: When (if ever) can I expect JavaFX
> to be present unconditionally with OpenJDK installs? I probably can't
> migrate to JavaFX until that day...
>
> --
> Mark Raynsford | http://www.io7m.com
>
>


The "javafx might not be present" problem

2018-02-09 Thread Mark Raynsford
Hello!

I've been using Swing for many years. One of the things I like most
about it is that it's essentially guaranteed to be present in any Java
SE installation, and although it's a little outdated aesthetically, it
works well and continues to work well.

I've been exploring the possibility of migrating to JavaFX on and off,
but the biggest showstopper for me is that JavaFX may not actually be
present in any given user's installation. If someone installs the
jre9-openjdk package on Arch Linux, for example, they don't get JavaFX.
If they install the java-openjfx package, they do (although Arch only
offers JavaFX 8 right now).

I'm migrating to Java 9 modules, and all new projects will be fully
modular projects. In the olden days (pre Java 9), it was possible to
detect if JavaFX was present with a reflection hack:

try {
  Class jfxPanel = classLoader.loadClass("javafx.embed.swing.JFXPanel");
  isJavaFxAvailable = true;
} catch (ClassNotFoundException e) {
  isJavaFxAvailable = false;
}

The idea being that you could at least display a friendly error message
to the user explaining that they need to install JavaFX if they're
using OpenJDK.

But obviously in a Java 9 project, that's not going to work: You'd need
to specify a "requires" clause on the JavaFX modules, and if they
weren't present, the VM wouldn't even start up so the above check
wouldn't get a chance to run.

For applications, I could probably try to bundle JavaFX with them
(although there may be licensing issues there). For libraries, I'm out
of luck. The only apparent option there is for me to pick a set of
Maven coordinates like "org.openjdk:javafx:8.0" and specify those in my
libary's POM file (and assume that the user is smart enough to deploy
JavaFX to a local repos to use it).

I suppose what I'm really saying is: When (if ever) can I expect JavaFX
to be present unconditionally with OpenJDK installs? I probably can't
migrate to JavaFX until that day...

-- 
Mark Raynsford | http://www.io7m.com