bugGNU Octave - Bugs: bug #38821, Support for java.lang.Byte /...


bug #38821: Support for java.lang.Byte / NoSuchMethodException

Submitted by:  Scott Haynes <scotth2o>
Submitted on:  Wed 24 Apr 2013 05:28:17 PM UTC  
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Scott HaynesOpen/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Thu 23 Apr 2015 09:22:50 PM UTC, comment #5:

Now fixed with http://hg.savannah.gnu.org/hgweb/octave/rev/8261c4a11250

Closing bug report

Carnë Draug <carandraug>
Project Member
Tue 21 Apr 2015 02:32:01 PM UTC, comment #4:

I came across this bug while fixing another (see comment #5 on bug #44882). Just for reference, my patch seems to this but has not been pushed yet.

Carnë Draug <carandraug>
Project Member
Thu 25 Apr 2013 07:24:18 PM UTC, comment #3:

Rik pointed to a similar, or the same, pages a while back. In that thread, Michael Goffioul has clarified how Octave and Java are supposed to interact and pass/convert objects/classes/types to each other.

Philip Nienhuis <philipnienhuis>
Project Member
Wed 24 Apr 2013 10:05:31 PM UTC, comment #2:

I ran across a couple pages on TMW web site that list how types should be converted between the interpreter and Java, the box and unbox operations in our Java interface. This seems as good a spec as any to try to aim for:


It is explicitly stated that int8 and uint8 should convert to a Java byte (the "unbox" direction in our library).

Mike Miller <mtmiller>
Project Administrator
Wed 24 Apr 2013 07:14:47 PM UTC, comment #1:

See this discussion:

Workaround for the OF Java package is something like:

aa = javaObject ("java.lang.Short", 1).byteValue

This doesn't work in core Octave (dev version) as Java Byte is boxed to an Octave double; so unlike Matlab there's no way to create a java.lang.Byte in Octave.

Philip Nienhuis <philipnienhuis>
Project Member
Wed 24 Apr 2013 05:28:17 PM UTC, original submission:

Using the java package version 1.2.9 the following line yields a no such method error in octave 3.4.3.

The equivalent in Matlab yields a class java.lang.Byte as shown below.

Scott Haynes <scotth2o>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by bkurtz (interested in this bug)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by scotth2o (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 23 Apr 2015 09:22:50 PM UTCcarandraugStatusConfirmed=>Fixed
    Wed 30 Apr 2014 07:35:39 AM UTCbkurtzCarbon-Copy-=>Added bkurtz
    Wed 24 Apr 2013 07:14:47 PM UTCphilipnienhuisCategoryOctave Forge Package=>Libraries
      Operating SystemGNU/Linux=>Any

    Back to the top

    Powered by Savane 3.1-cleanup1