hi, I have this java class
 
public class Foo {
    public void com(java.lang.Comparable c) {
    }
}
 
in jython I want to pass it a jython string:
 
jython
Jython 2.1 on java1.4.1_01 (JIT: null)
Type "copyright", "credits" or "license" for more information.
>>> import Foo
>>> f=Foo()
>>> f.com('as')
Traceback (innermost last):
  File "<console>", line 1, in ?
TypeError: com(): 1st arg can't be coerced to java.lang.Comparable
>>>
 
I would expect jython to know that Java String class
implements the java.lang.Comparable interface, and
does some coercion so that it would work, just
as if I typed this:
>>>from java.lang import String
...
>>>f.com(String('as'))
 
Am I missing something? sorry if this is an old question.
thanks
ma0hai



Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.