I don’t know why but i cant seem to get the JavaFX working with Elements (Visual Studio 2015).
I add the reference to jfxtr.jar located on the lib/ext directory and when I compile I get ‘Unknown namepace’ errors for the javafx includes (testing with RemObjects C#).
Ok was able to compile it (error on my part) but now it gives me an exception.
An exception of type: java.lang.RuntimeException occurred
Message: {java.lang.RuntimeException: Unable to construct Application instance: class test.Program}
at Application.launch()
Program.main$()
Program.main()
NativeMethodAccessorImpl.invoke0()
NativeMethodAccessorImpl.invoke()
DelegatingMethodAccessorImpl.invoke()
Method.invoke()
LauncherImpl.launchApplicationWithArgs()
LauncherImpl.launchApplication()
NativeMethodAccessorImpl.invoke0()
NativeMethodAccessorImpl.invoke()
DelegatingMethodAccessorImpl.invoke()
Method.invoke()
LauncherHelper$FXHelper.main()
Im testing with the simplest javafx app (in C#):
using java.util;
using javafx.application;
using javafx.scene;
using javafx.scene.layout;
using javafx.stage;
namespace Test{
public static class Program:Application{
public override void start(Stage primaryStage) {
try {
BorderPane root = new BorderPane();
Scene scene = new Scene(root,400,400);
primaryStage.setScene(scene);
primaryStage.show();
} catch(Exception e) {
e.printStackTrace();
}
}
public static Int32 Main(string[] args){
launch(args);
return 0;
}
}
}
BTW this is the javafx app that works on eclipse
package application;
import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
public class Main extends Application {
@Override
public void start(Stage primaryStage) {
try {
BorderPane root = new BorderPane();
Scene scene = new Scene(root,400,400);
primaryStage.setScene(scene);
primaryStage.show();
} catch(Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
launch(args);
}
}