Ramazan Cinardere
Ramazan Cinardere

Reputation: 133

JavaFx: Alert don't work after build

I got a very strange problem. I develope a program which schould show an Alert (javafx.scene.control.Alert) to the user.
In the IDE (Eclipse-Luna) it works fine. To run the programm, a .exe file is building and install on my pc. Installing the .exe file works perfect. After starting the programm, a error occures which confuses me.

enter image description here

The error which is shown above (screenshot from my pc), is the position in the program where the Alert should be shown.

Alert alert = new Alert(AlertType.INFORMATION);
alert.setTitle("Information Dialog");
alert.setHeaderText("Look, an Information Dialog");
alert.setContentText("I have a great message for you!");

alert.showAndWait();

Technical information:

I'm really confused... Can any one help me??

Upvotes: 0

Views: 395

Answers (2)

Naveen Patil
Naveen Patil

Reputation: 51

I had the same issue while running the .exe. I was able to resolve it by uninstalling application and installing the latest application. Auto uninstallation can be achieved with WIX toolset for .msi builds, and Inno setup for exe builds.

This might help: Auto uninstallation of exe builds

Upvotes: 1

RamV13
RamV13

Reputation: 567

This seems like a version issue. JavaFX Alert's were introduced in JDK 8u40 so it makes sense that it works fine given your technical information.

My best guess is that the error occurs because your JRE which is running the executable is not 8u40 or later but rather some earlier version.

Upvotes: 0

Related Questions