You can run it from your browser here:
https://schierlm.github.io/OberonEmulator/
This includes my own Oberon-07 compiler targeting the JVM: https://github.com/lboasso/oberonc
For example the Oberon definition below:
DEFINITION MathUtil;
PROCEDURE ln(x : REAL) : REAL;
END MathUtil.
exposes the Java MathUtil.ln() static method: public class MathUtil {
public static float ln(float x) {
return (float) java.lang.Math.log(x);
}
}
A client module can use now the Java implementation of ln: MODULE Client;
IMPORT MathUtil;
VAR x: REAL;
BEGIN
x: = MathUtil.ln(2.0);
MathUtil.ln()
END Client;
For a complete example see https://github.com/lboasso/oberonc/tree/master/examples/fern > DEFINITION
I am not sure, but would a MODULE only containing declarations (and no or empty body) also work, syntactically?