Can't select application class for JavaFX artifact
Answered
Hi,
after hours of searching, i have to turn to this forum.
I try to configure a build artifact for my JavaFX Application and want to set the application class on the JavaFX Tab.
But when i click the little folder icon, the window doesn't show any classes. If i switch to the "project" tab and try to select my main class manually, it won't activate the OK Button.


What am i doing wrong?
The Version of IntelliJ is IntelliJ Community 2019.1.3
Please sign in to leave a comment.
Oooook...
I should have know....
It's a bug!
Just had a hunch and installed IntelliJ Community 2018.3.6 and hey... It works...
And it seems like there is already an open bug report, which didn't show up in Google.
Please vote and follow the https://youtrack.jetbrains.com/issue/IDEA-209569 Note that you can just enter class name manually.
dude I have the same problem and I am searching for more than 2 hours for the solution but THERE İS NO SOLUTİON. I have the ultimate version and I did what u did and install the community one but I have the same problem pls can u help me
@Bmetropol 99
It's IntelliJ IDEA bug and the only workaround here is to define the class name manually.
Does it work for you?
Konstantin Annikov, he litteraly says at teh bottom, he cant define the class manualy. and i have the same problem in version 2020.2.3
Mattis this issue has been fixed in latedt IDE veriosns. You can enter class name in this dialog and select it:
Make sure you are using the version from https://www.jetbrains.com/idea/download/ or latest 2020.2.X version from https://www.jetbrains.com/idea/download/other.html
I am still unable to find my main class, even if i type out the full name with correct upper and lowercases.
Sorry if I sounded like I was angry, I regret that. but I'm a beginner with Java and i like Intellij better than other IDE's becuase of the code completion. and since i am going to be working with it, i need to learn some stuff.
What IDE version do you use? Does this class extends javafx.application.Application?
Please provide a sample project to check if problem remains. Thank you.
For uploading you can use https://uploads.jetbrains.com or any file sharing service.
Hello, I'm using version 2020.2.3 and no the main class does not extends Application. I dont know what application to extend
this is the ID to the upload service: 2021_01_25_GEjcZUweK8oKX2bH
>no the main class does not extends Application. I dont know what application to extend
The valid JavaFx main class must extend this class. Please refer to JavaFx documentation. Or check example tutorials, see e.g. https://docs.oracle.com/javafx/2/get_started/hello_world.htm
I am unable to extend Application. Do I need some library or does it just not work for me? i want it to export to an .exe file. Intellij has an export tab under File, why doesnt that work for things like this?
I would recommend you to start with a tutorial about JavaFx in general e.g. https://openjfx.io/openjfx-docs/ and https://www.jetbrains.com/help/idea/javafx.html
Note that if you're using a JDK build of version 9 and later, you would need to use third-party solutions for packaging since the javafx bundled with JDK packager tool was removed from the JDK and it will not be possible to use it in IDE for packaging. For the example, refer to section Runtime images in the JavaFX official documentation.
Also you can check example projects for packaging JavaFx project into a platform specific executable: https://github.com/dlemmermann/JPackageScriptFX