Hi Thorsen, it looks like you were on the right path. I'm guessing there
may be a bug or issue with the double signature

This works:

: (java (java "java.lang.Math" "abs" -4))
-> 4

: (java (java "java.lang.Math" "min" 10 5))
-> 5

But I'm just guessing

On Thu, Mar 2, 2017 at 3:02 PM, Thorsten Jolitz <tjol...@gmail.com> wrote:

>
> Hi List,
>
> I'm experimenting a bit with the 'java' function, and the StringBuilder
> and GregorianCalendar example from the JavaCode Wiki entry work fine,
> but I wonder how to use a constructorless class like e.g. java.lang.Math
> with its static class methods?
>
> #+NAME: JavaCode - none of these work
> #+BEGIN_SRC picolisp
> (java "java.lang.Math" 'sqrt 4)
> (java java.lang.Math 'sqrt 4)
> (java 'java.lang.Math 'sqrt 4)
>
> (setq M (java "java.lang.Math" T))  // returns null, no constructor
> #+END_SRC
>
> Thanks for any hints.
>
> --
> cheers,
> Thorsten
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>

Reply via email to