2

I would like to interact (as transparently as possible from the Java point of view) with the controls of a JavaFX application from an application in a foreign language (Prolog). Java and Prolog are connected by means of JNI and I have already resolved the JNI interaction issues.

My question is:

What is the best way to instrument an arbitrary JavaFX application so I could inject code somewhere to invoke a routine in Prolog immediately after the primary Stage has been instantiated ? (so Prolog will be able to refer to the nodes in the Scene Graph of the Stage).

I think Scenic View does something similar using agents to instrument a bit an arbitrary JavaFX application that does not have any code related to Scenic View.

In my problem, the objective is that the JavaFX interface could be created without JNI related code and having only presentation logic. The code starting the Prolog program with JNI should be somehow injected after the interface is ready. So the idea is to use Java only for the interface of my program and the core logic of my application is implemented in Prolog.

Sergio
  • 8,532
  • 11
  • 52
  • 94
  • This question is too convoluted as it is, consider breaking it up into separate questions, e.g. "How can I get a reference to the primary Stage of a running JavaFX application?", would be a fine question . . . – jewelsea Apr 03 '13 at 23:32
  • What is a foreign language? lingual or computer based? e.g. french or scala? – jewelsea Apr 03 '13 at 23:33
  • Hi @jewelsea, you are right, will try to clarify it a bit. Regarding the second point, it is obviously not Scala or French since I am using JNI for interacting with it ;) – Sergio Apr 03 '13 at 23:36

0 Answers0