[netcdf-java] Calling write from jruby

Hello,

I know my current problem has to do with jruby and jruby integration
rather than netcdf-java, but maybe someone in the list has experience
in working with jruby and netcdf.  If not, just forget the question!

I´m trying to call netcdf-java through jruby.  I have java-7, jruby
1.6.7.2 and netcdf-4.2.  I´ve managed to create dimensions and
variables without problem. Now I´m trying to write data to a variable
that was created with one dimension of size 5.  When I call the write
method, passing an Array created as [0,1,2,3,4].to_java(Java::int) I
get the following error:

                     no method 'write' for arguments
(org.jruby.RubyString,org.jruby.java.proxies.ArrayJavaProxy) on
Java::UcarNc2::NetcdfFileWriteable.

I´m pretty sure that the problem is the convertion of the ruby array
to java array.

Can anybody help?

-- 
Rodrigo Botafogo
Integrando TI ao seu negócio



  • 2012 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: