 <p>The inner class must be public.</p> <pre><code>package org.example; public class Foo { public abstract static class MyInnerClass { abstract void print(String s); } public void pr() { System.out.println("foo"); } } </code></pre> <p><strong>First test</strong>: Subclass and instantiate the outer <code>Foo</code> class:</p> <pre><code>$ java -classpath $PWD:/usr/share/java/js.jar:/usr/share/java/jline.jar:. org.mozilla.javascript.tools.shell.Main Rhino 1.7 release 2 2010 01 20 js&gt; var a = new JavaAdapter(Packages.org.example.Foo, { &gt; pr: function() { print("jsfoo"); }, &gt; }); js&gt; a.pr(); jsfoo </code></pre> <p><strong>Second test</strong>: Subclass and instantiate the inner class:</p> <pre><code>js&gt; var b = new JavaAdapter(Packages.org.example.Foo.MyInnerClass, { &gt; print: function(s) { print("Inner: " + s); }, &gt; }); js&gt; b.print("one"); Inner: one undefined </code></pre> <p><strong>Note</strong>: If I change the inner class not to be public, I get the exact same error you reported.</p>