Product Selector

Fusion 5.12
    Fusion 5.12

    Debug Custom JavaScript Index Stages

    To debug a JavaScript Index stage you can:

    • Check the Fusion API server logs for errors.

    • Use the logger object for print debugging (in the Fusion log file api.log).

    The JavaScript Engine Used by Fusion

    The JavaScript engine used by Fusion is the Nashorn engine from Oracle. See The Nashorn Java API for details.

    Creating and accessing Java types

    The following information is taken from Oracle’s JavaScript programming guide section 3, Using Java From Scripts.

    To create script objects that access and reference Java types from Javascript use the Java.type() function:

    var ArrayList = Java.type("java.util.ArrayList");
    var a = new ArrayList;