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.

ie.

package org.dog;
public org.dog.Stuff [] getFood()
public void setFood(org.dog.String [] a)

in python:

b = getFood()
print b
... I get the array contents here?  so it is converted to a python array?

setFood(b)
... Error cannot convert the type.

I guess I would need something in between getFood and setFood




On 9/16/05, Updike, Clark <Clark.Updike@jhuapl.edu> wrote:
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'])
>>> java.util.Arrays.asList(sa)
[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.

-Clark

-----Original Message-----
From:  On Behalf Of Berlin Brown
Sent: Friday, September 16, 2005 1:26 PM
To: jython-users@lists.sourceforge.net
Subject: [Jython-users] Jython and jarray.array , passing args to java
methods


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.