Implementing Java interface from JavaScript fails with a TypeError
===

I have an interface `ru.focusmedia.odp.server.scripts.api.Script` and tried to implement it according to the example in http://docs.oracle.com/javase/6/docs/technotes/guides/scripting/programmer_guide/index.html:

    new Packages.ru.focusmedia.odp.server.scripts.api.Script() {
    	...
    };

However, this gives the following exception:

> javax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: TypeError: [JavaPackage ru.focusmedia.odp.server.scripts.api.Script] is not a function, it is sun.org.mozilla.javascript.internal.NativeJavaPackage. (<Unknown source>#1) in <Unknown source> at line number 1

`new Packages.java.lang.Runnable()` works. What is the problem?