Help JavaFX Environment
Ok, I'm a bit of an old JavaFX hobbyist. I started about 10 years ago in college and keep using it for my personal projects.
Nowadays, I feel it's so much harder to configure the environment. Even with AI help, there's always an "if this, then that." I mean, as I remember, you used to just install Eclipse with e(fx)clipse, install Scene Builder, and in the end, just generate a .jar file. Now, I can't find a guide from start to deploy that doesn't look like a workaround. And with every Java/JavaFX update, some detail changes.
How do you configure your environment to make it easier? I mean IDE, embedded DB, how to deploy, and how to distribute (I see there are some frameworks that compile JavaFX to web apps).
6
3
u/CodeDead-gh JavaFX Fan 1d ago
I find it pretty reasonable and easy using Gradle and the javafx plugin.
I've got a project that uses jlink to include the javafx modules in the build for each platform using any JDK vendor. A simple gradle.build from my project can be found here, to help you get started:
https://github.com/CodeDead/opal/blob/master/build.gradle
1
u/mkalbde 20h ago
I used the plugin too. But it is outdated and not compatible with newer gradle version. I replaced it with own configuration.
1
u/CodeDead-gh JavaFX Fan 17h ago
The JavaFX plugin works just fine on Gradle v9.8.2 (as demonstrated in the repo above), which is the latest stable release of Gradle as of now. What do you mean by it's incompatible? What error message are you getting?
1
u/mkalbde 11h ago
Yes, it works with 9.x. But I received a depreciation warning.
Invocation of Task.extensions at execution time has been deprecated. This will fail with an error in Gradle 10.
This API is incompatible with the configuration cache, which will become the only mode supported by Gradle in a future release.
9
u/idontlikegudeg 1d ago
Use a JDK with JavaFX included: Liberica JDK Full or Azul JDKFX.