openjfx / openjfx-docs

Getting started guide for JavaFX 11
BSD 3-Clause "New" or "Revised" License
96 stars 25 forks source link

HelloFX package anomaly #194

Open gmseed opened 3 years ago

gmseed commented 3 years ago

I have a slight problem with the sample provided at:

https://openjfx.io/openjfx-docs/#maven

When we run the specified generate command it creates a src file org.openjfx.App. Note the package "org.openjfx".

We could then either change the name of App or add a HelloFX .java file in the same folder.

It would make no sense to not assign a package to HelloFX, otherwise we would not have specified the groudId of org.openjfx.

However, when we look at the plugin we see:

HelloFX

and not something along the lines with the auto-generated , which includes the package path:

org.openjfx.App

To a beginner of JavaFX (and that is the whole point of this code) this sort of thing is very confusing.

juerg-b69 commented 2 years ago

I tried this example, what ever I do, I get: package javafx.application does not exist, same for javafx.scene, etc. Facts: OS is windows 10, Javajdk 17.0.1 same for javafx i.e. 17.0.1. maven is version 3.8.2. For the javafx-maven-plugin I tried version 0.0.3 and 0.0.8 no change, it's the same problem. JAVA_HOME is set correctly as well as the PATH which includes javajdk and javafx. I included the Example within eclipse, I adjusted the module-info.java correctly. The Example works as expected showing: "Hello, JavaFX 17, running on Java 17.0.1" running the Example by maven with the -X switch within eclipse, or from the terminal results in exactly the same error: org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.openjfx:javafx-maven-plugin:0.0.3:run ! or :javafx-maven-plugin:0.0.8 Hence I guess this plugin requires a review!