help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: java package - aa= javaObject('java.lang.Byte',uint8(1));


From: Scott Haynes
Subject: Re: java package - aa= javaObject('java.lang.Byte',uint8(1));
Date: Tue, 23 Apr 2013 17:06:49 -0600

Well, that's unfortunate but I will add that matlab also has issues with this particular call and it took me some time to get those kinks worked out. I'll take a look at the svn/code tomorrow and if it appears to be beyond my ability I'll fill out a bug report.  If I get something that works I'll post it here.

Thanks

Scott


On Tue, Apr 23, 2013 at 4:37 PM, PhilipNienhuis <address@hidden> wrote:
scotth2o wrote
> Hello,
>
> I'm trying to make octave communicate with a java API used for ssh/sftp
> etc ... I'm using java 1.2.9 & octave 3.4.3 on (old) fedora linux. The
> java method requires the following:
>
>  byte[] readMatlab(ch.ethz.ssh2.SFTPv3FileHandle, long, byte[], int, int)
>
> The following syntax works in matlab:
>
>     >> out=h.readMatlab(fid.filehandel,...
>                                     uint32(fid.fileoffset), ...
>                                     uint8(zeros(1,nsz)), ...
>                                     uint16(0), ...
>                                     uint16(nsz))
>
> I've tried several variations of the matlab syntax above and I think the
> best guess at something that should work in octave is below.
>
>             >>        iout=javaArray('java.lang.Byte',nsz);
>             >>        iout=java_invoke(h,'readMatlab', ...
>                                fid.filehandel,...
>                                java_new('java.lang.Long',fid.fileoffset),
> ...
>                                javaArray('java.lang.Byte',nsz), ...
>                                java_new('java.lang.Integer',0), ...
>                                java_new('java.lang.Integer',nsz));
>
> Unfortunately it doesn't work & I'm wondering where to look for additional
> debug information. My guess is the java byte array is what is screwing
> things up  & I think it all boils down to the following line which I can't
> make run.
>
>   >> aa= javaObject('java.lang.Byte',uint8(1));
>
> Any advice is appreciated.  Thanks in advance & best regards

Rings a bell....
Some years ago I added support for java.lang.Short and some other type I
needed (forgot what it was), guided by the Java package maintainer. Perhaps
this has to be done for java.lang.Byte as well, and maybe more Java types.

Please fill out a bug report, then I'll look into it, but do not expect
results before end of this week, maybe even later, sorry.
If it is a missing type, it'll have to be fixed in core Octave as well, I'm
afraid.

If you want to try to fix it yourself, look in OF svn, old packages, for
__java__.cc and octave.java, notably the ClassHelper stuff.
You should be able to find it by browsing the commit messages (look for s/th
like "added java.lang.Short".); must be around Spring 2011, IIRC

Philip




--
View this message in context: http://octave.1599824.n4.nabble.com/java-package-aa-javaObject-java-lang-Byte-uint8-1-tp4652216p4652238.html
Sent from the Octave - General mailing list archive at Nabble.com.
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave



--
Scott Haynes
112 Barbara St.
Louisville CO 80027
307-760-0543

reply via email to

[Prev in Thread] Current Thread [Next in Thread]