Yes makes sense.  If one really wants side effects in a Java Repo module the below will do it.

Looking forward to the custom lib feature and lib/custom seems a good name to me.
Thanks

/Andy

---------------------
package org.basex.modules;

public class Hello {

    private String str = "BaseX";

    public Hello() {}

    public void setDefault(String str) {
        this.str = str;
    }

    public String hello(final String world) {
        return "Hello " + world;
    }

    public String hello() {
        return "Hello " + str;
    }
}
-------------------------------
import module namespace t='org.basex.modules.Hello';
t:setDefault("my default"),
t:hello()

On 15 May 2017 at 09:15, Christian Grün <christian.gruen@gmail.com> wrote:
But is the original problem a bug?
That is after installing the jar via REPO install t:new("aaa") fails although it works when added to lib/

​It’s not really bug, rather a restriction of repository modules (calling it a “feature” may be a bit too euphemistic ;): Repository modules must be imported, and they must have one constructor without arguments.