[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: arrays with octave-java
From: |
PhilipNienhuis |
Subject: |
Re: arrays with octave-java |
Date: |
Sun, 24 Feb 2013 14:44:34 -0800 (PST) |
Ernst Reissner wrote
> Hi all,
> i use octave-java 1.2.8 for invoking java code from within octave.
> Works well but now i have some strange problem.
>
> arr is an array.
> I thought that i could write just arr.length, but does not work.
> Then i tried java_get(arr,'length') which did not work either.
> What did work is by reflection:
> java_invoke('java.lang.reflect.Array', 'getLength', arr);
>
> This seems overkill to me.
>
> How to get a smooth solution?
If arr is a java array, you could do:
javamethods (arr)
to get a list of Java methods that can be invoked on arr in the
object.method() fashion.
Philip
--
View this message in context:
http://octave.1599824.n4.nabble.com/arrays-with-octave-java-tp4650246p4650248.html
Sent from the Octave - General mailing list archive at Nabble.com.