Currently the code is mostly java based, meaning the java code is
returning an array and I am passing that array to another java method
and it is blowing up. I might need to inject something there.
public org.dog.Stuff  getFood()
public void setFood(org.dog.String  a)
b = getFood()
... I get the array contents here? so it is converted to a python array?
... Error cannot convert the type.
I guess I would need something in between getFood and setFood
Seems to work for me:
Jython 2.2a2 on java1.4.2_08 (JIT: null)
Type "copyright", "credits" or "license" for more information.
>>> import java
>>> import array
>>> sa = array.array(java.lang.String, ['hello','whirled'])
You should use array instead of jarray for 2.2. It aligns
with cpython better (although jarray and array use the same
underlying functionality). Eventually jarray will go away.
From: On Behalf Of Berlin Brown
Sent: Friday, September 16, 2005 1:26 PM
Subject: [Jython-users] Jython and jarray.array , passing args to java
Hmm, maybe I am missing something simple, but I can't
pass a jarray.array to a java method that uses arrays?
Does this functionality exist and what am I missing.
This is with the newest July2005 release of jython.