Elements and JavaFX

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#).

So anyone using JavaFX?

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);
	}
}

Hrmm that shouldn’t even compile. Drop the static in public static class Program:Application{

Thanks, logged as bugs://73967

Ok, it works. No idea where I got that static from. Anyway another question: Is it possible to create enums like this (java code example)

public enum EnumWithProperties {
	NAME1("Pretty Name 1"),
	NAME2("Pretty Name 2"),
	NAME3("Pretty Name 3");
	// 
	private String prettyName;
	//
	private EnumWithProperties(String prettyName){
		this.prettyName=prettyName;
	}
	public String getPretty(){
		return(prettyName);
	}
}

I think Delphi only allows numeric enums (AFAIK, last one I used was Delphi 2010), is oxygene (or elements) the same?

bugs://73967 got closed with status fixed.