JavaFX: Bringing Rich Experiences To All the Screens Of Your Life

Profile: desktop, common

Overview

Inherited Variables

Constructor Summary

public FXEvaluator()
Returns
 

Method Summary

public static java.lang.Object eval(java.lang.String script)

Evaluates a JavaFX Script source string and returns its result, if any.

Evaluates a JavaFX Script source string and returns its result, if any. For example,
This method depends upon the JavaFX Script compiler API being accessible by the application, such as including the javafxc.jar file in the application's classpath.
This method also depends upon the JSR-223 API classes being accessible by the application, such as including the script-api.jar file in the application's classpath or the application must be run on JDK 6+ where JSR-223 API classes are part of the platform API. For JDK 5, script-api.jar has to be in application's classpath.
Note: this method provides only the simplest scripting functionality; the script is evaluated without any specified context state, nor can any state it creates during evaluation be reused by other scripts. For sophisticated scripting applications, use the Java Scripting API (javax.scripting).

Parameters
script
the JavaFX Script source to evaluate
Returns
Object
the results from evaluating the script, or null if no results are returned by the script.
 

Inherited Functions