code: private static void loadScript(ScriptEngine engine, Supplier<Reader> scriptReader) {
  
          try (Reader reader = scriptReader.get()) {
              engine.eval(reader);
          } catch (ScriptException | IOException e) {
              throw new RuntimeException(e);
          }
  
      }
docs: Loads a single script from an URL into the script engine
  
  @param engine       the engine that should evaluate the script
  @param scriptReader the script source to be loaded into the script