code: public void load(ScriptEngine engine) {
          try {
              //module loading
              engine.eval("load('" + getResourceAsURLStirng("/eclairjs/EclairJS_Globals.js") + "');");
              engine.eval("load('" + getResourceAsURLStirng("/eclairjs/ModuleUtils.js") + "');");
              engine.eval("load('" + getResourceAsURLStirng("/eclairjs/jvm-npm/jvm-npm.js") + "');");
              engine.eval("load('" + getResourceAsURLStirng("/eclairjs/Serialize.js") + "');");
  
              NashornEngineSingleton.setEngine(engine);
          } catch(Exception e) {
              e.printStackTrace();
          }
      }
docs: /*
  private boolean isLoadingOnWorkerNode() {
  String jarLoc = Utils.jarLoc();
  if (jarLoc != null && sparkHome != null) {
  return jarLoc.indexOf(sparkHome, 0) > -1;
  }
  return false;
  }