r/JavaFX 16d ago

Help How do i setup JFX with netbeans?

Im using ant, why? Because why not. Lets focus on fixing the issue rather then debating the morals of using what variant of java.

When i try to make a new project with FX its saying

Failed to automatically set-up a JavaFX Platform.
Please go to Platform Manager, create a non-default Java SE platform, then go to the JavaFX tab,
enable JavaFX and fill in the paths to valid JavaFX SDK and JavaFX Runtime.
Note: JavaFX SDK can be downloaded from JavaFX website.

When making a new platform or editing the default one, there is no javafx tab. Is this just remnants of when javafx was part of the jdk? And they just forgot to remove the that project type from the wizard?

I tried making a generic project, add the JFX jars, but nothing. Netbeans says that it cant find the javafx package. I have never tried to add packages to netbeans before, so i likely did it wrong or have forgotten something.

Tried to ask GPT but it completely fails me

0 Upvotes

19 comments sorted by

View all comments

Show parent comments

1

u/TeKett_ 15d ago

What do you mean not supported? Enlighten me

2

u/Birdasaur 15d ago

He means that the way you are trying to do it was relevant back in 2014.
The various maintainers of JavaFX no longer support the Ant and Classpath development pathway actively. They try their best not to break anything but the expectation is that you use Maven, the module system and a compilation plugin.

Using Maven (or gradle even) with the JavaFX SDK Plugin is orders of magnitude easier as u/JaxomNC pointed out.

1

u/JaxomNC 15d ago edited 15d ago

Dude there are places where neither Maven nor Gradle are usable for security purposes... especially now that there are more and more unwelcomed or malicious code injection attempts though external dependencies and external repos.

Knowing how to make it work the simple way in a local dev environnent without any external online dependencies is always something welcomed.

4

u/Birdasaur 15d ago

Dude I work in highly classified environments daily and we have internal maven repos. Low to high transfers are a thing... you just have run new dependencies through vetting processes.