Question ad creating a testcase that needs a jar on class- or module path

Rony G. Flatscher Rony.Flatscher at
Fri Jan 31 15:28:32 UTC 2020

How would one go about creating a testcase that needs a jar-file either on the class- or module path?

Are there any test units that would demonstrate how to do it? If not, what approach would you
suggest (and if so, are there any samples already somewhere to study)?


Background: for creating a testcase using a pseudo script engine ("RgfPseudoScriptEngine") that logs
its invocations with the script context Bindings for each invocation and which then will be analyzed
and used for the test assertions, there is a need to have the pseudo script engine made available
via the Java scripting framework.

There is a jar-file (that includes the sources as well) with the necessary definitions:

  * via class path: "META-INF/services/javax.script.ScriptEngineFactory" entry:


  * via module path which will use the information in "":

    module rgf.scriptEngine {
        requires java.scripting;
        provides javax.script.ScriptEngineFactory with rgf.scriptEngine.RgfPseudoScriptEngineFactory;
        exports rgf.scriptEngine;           



More information about the openjfx-dev mailing list