I\'ve been banging my head against the wall for a couple days now trying to figure this out. I\'ve been starting to play around with Jython for fast prototyping. I\'ve hit w
I think there may be an error in that example. When you import X in Jython, this looks for a Java package named X, not for a class named X.
Try:
// Beach.java
package com.stackoverflow.beach;
public class Beach {
private String name;
...
and in Jython:
from com.stackoverflow.beach import Beach
bondi = Beach("Bondi Beach", "Sydney")
edit: Also, you might want to make sure that the full name of the .jar file -- and not just the directory where it resides -- is listed on the CLASSPATH. This is certainly necessary in Java, and I assume Jython's rules are the same in this regard.