I'm trying to call a java method inside JavaScript.
The core constructors or methods could be used whereas a user-defined method couldnt be.

This works --> "var temp = new Packages.java.lang.Long(10); document.writeln(temp);"

But the following doesnt work --> " var tmp = new Packages.myclasses.myconstructor(); "
where "myconstructor" is an own class inside package "myclasses"

Can anyone help me in setting the classpath correctly to the user-defined classes in this case.
Waiting eagerly for a reply,