|
From: bwgoudey <bwg...@gm...> - 2007-08-20 00:40:23
|
Fantastic! Thats work great. Thank you very much.
Jeff Emanuel wrote:
>
>
> >>> import java,jarray
> >>> stringArrayType=java.lang.Class.forName('[Ljava.lang.String;')
> >>> print jarray.array([["a b"], ["c d e"]],stringArrayType)
> array([array(['a b'], java.lang.String), array(['c d e'],
> java.lang.String)], [Ljava.lang.String;)
>
>
>
> bwgoudey wrote:
>> I'm having trouble passing a String[][] to a java function. If I try
>> passing
>> it a python array of array of strings, ie [["a b"], ["c d e"]], I get the
>> error "java.lang.IllegalArgumentException: Not a String or String[][];
>> got
>> [['a b'], ['c d e']]". I had thought that lists and strings in python
>> were
>> supposed to be converted to their Java equivalent when needed but that
>> does
>> not seem to occur here. Perhaps I have to create my array using jarray
>> but I
>> am unsure how to use this for creating arrays of arrays. Does anyone have
>> any ideas as to why I am unable to pass my object correctly?
>>
>> Thanks
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Jython-users mailing list
> Jyt...@li...
> https://lists.sourceforge.net/lists/listinfo/jython-users
>
>
--
View this message in context: http://www.nabble.com/Can%27t-pass-String------to-a-java-function-tf4293984.html#a12228537
Sent from the jython-users mailing list archive at Nabble.com.
|