JavaFX Launch Failure on Ubuntu from JNI
Steve Hannah
steve at weblite.ca
Wed Jan 19 22:12:27 UTC 2022
Thanks for all the replies on this. I'm working on getting a minimal
example. Sadly I'm reduced to a hello-world JavaFX application that I
can't get running using Maven dependencies, even just doing it the plain
old way with "java -jar target/hello-world-1.0-SNAPSHOT.jar".
I get: "Error: JavaFX runtime components are missing, and are required to
run this application", even though all the jars should be findable on the
classpath via the executable jar's Class-Path entry.
I have been resisting using modules for a long time because it just makes
things more complicated, but I'm getting the feeling (both from replies on
this thread, and from the quirks I'm hitting here) that I'll need to use
modules if I want to use JavaFX.
Currently the hello world project is just a plain maven project where I add
the javafx dependencies (i.e. I'm not using the javafx archetype). This
works in my real projects, but not in the hello-world - perhaps because the
hello world project extends Application in its main class, and the
real-world project does not. I'll have to dissect the javafx archetype to
see what kind of magic sauce it adds over and above just the dependencies.
Steve
On Wed, Jan 19, 2022 at 1:49 PM Kevin Rushforth <kevin.rushforth at oracle.com>
wrote:
>
>
> On 1/19/2022 1:46 PM, Michael Hall wrote:
> >
> >> On Jan 19, 2022, at 2:13 PM, Matthias Bläsing <
> mblaesing at doppel-helix.eu> wrote:
> >>
> >> Unsupported != does not work!
> > But it might mean less tested. So you might have to worry about things
> like it works here but does it work on Linux? It works with version x but
> does it work with y?
> >
> >> At this point in time Apache NetBeans loads JavaFX from classpath and
> >> it works.
> > Probably means it’s pretty thoroughly tested though.
> >
> >> FWIW, in a draft of my earlier reply, I had written a comment pointing
> out that JavaFX is only supported with modules. I didn't include it,
> because I think it very unlikely that that's related to the problem.
> >>
> >> I think a simple reproducer will be most helpful in tracking this down.
> >>
> >> — Kevin
> > It probably isn’t the cause but since the OP indicated he was looking
> for suggestions, and not necessarily a bug fix at this point, I thought it
> might be worth a mention. If he wasn’t aware of this he might want to
> consider it on future updates.
>
> Yes, it was worth a mention, and might even be something he could test
> locally to see if it makes a difference.
>
> -- Kevin
>
>
--
Steve Hannah
Web Lite Solutions Corp.
More information about the openjfx-dev
mailing list