Closed Zaoyee closed 3 years ago
I don't know how to do it with the new syntax (that you are showing), but it can be done with the old syntax, as documented at https://jpype.readthedocs.io/en/latest/quickguide.html?highlight=jarray#arrays, with:
>>> s_arr = jp.JArray(jp.JString, 1)(['one', 'two', 'three'])
>>> type(s_arr)
<java class 'java.lang.String[]'>
>>> print(list(s_arr))
['one', 'two', 'three']
This one was fixed by the array bug. It was making arrays of type String[][] rather than String[]. It will be fixed in 1.3.
Hi, thanks for the package. It helps a lot for my project. I met a problem in my project and unbale to find reason anywhere.
I was trying to call main function of the
abc.jar
, so I have to pass aString[]
. As mentioned in JPype Docs, string array can be defined as followingAnd I got error like this , I was wondering why
btw, Is there any other way to assign the value to the JString array, somthing like this would be nice
Thanks for the help, Respect