I have a javaFx program(A) into a jar which i am running on click of a button in the other JFrames program(B) using the command:
String rValue = A.main(arg);
A returns some value which is caught in rValue.
which the button is clicked for the first time it is working fine, but when this event occurs second time it is showing an error:
Error code
Exception in thread "main" java.lang.IllegalStateException: Application launch must not be called more than once
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:162)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:143)
at javafx.application.Application.launch(Application.java:252)
at a.A.main(A.java:64)
at B.main(B.java:80)
I need some help for this. Thanks in advance.