Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Import external Package/Class not working.

43 views
Skip to first unread message

sk

unread,
May 26, 2010, 5:59:50 PM5/26/10
to
I have the following class in a file test.class. The file is in the
CLASSPATH.

package testpackage;
public class Test
{
public Test()
{
}

public String getTest()
{
return "testing";
}
}

From Rhino, I just want to go:

var x = new Packages.testPackage.Test();

I keep getting: TypeError: [JavaPackage testpackage.Test] is not a
function, it is object.

No matter what I try, importClass, importPackage, or just namespacing
the Packages.* hierarchy, I can't seem to load this damn class.

Any insights are greatly appreciated.

0 new messages