How to import your own non-packaged Java classes in Jython
- by thepandaatemyface
I know in Jython you can do
import java.util.Random as Random
Random().nextInt()
But if I have a class I wrote myself, how can I import it into Jython without putting the class itself in a package? If I have a testclass Test:
public class Test {
public void foo() {
System.out.println("bar");
}
}
that's not inside a package. Can I even import that into jython by using something along the lines offrom Test import Test?