GNU Octave - Tasks: task #12601, Octave/Matlab differences...
You are not allowed to post comments on this tracker with your current authentication level.
task #12601: Octave/Matlab differences regarding Java
Submitter: | Rik <rik5> | ||
Submitted: | Sat 04 May 2013 10:35:40 PM UTC | ||
Should Start On: | Sat 04 May 2013 07:00:00 AM UTC | Should be Finished on: | Sat 04 May 2013 07:00:00 AM UTC |
Category: | Wish | Priority: | 5 - Normal |
Status: | None | Privacy: | Public |
Assigned to: | None | Originator Name: | |
Open/Closed: | Open | Fixed Release: | None |
Planned Release: | None |
Mon 28 Sep 2015 11:59:36 AM UTC, comment #4: |
Philip Nienhuis <philipnienhuis>![]() |
Thu 01 May 2014 10:26:14 PM UTC, comment #3: Another useful thing to add would be load/save support for Java objects. This would require providing implementations for the virtual functions save_binary and load_binary in ov-java.cc.
A very reasonable approach would be to call the Serialize method of the java object itself and then just store the data.
I just tried this and it worked out fine:
The first time I read the object it just returned a double of 3.1416. I think this is probably caused by Octave auto-converting the result from a Java object to a double. The second time I called the Java constructor with the results of the readObject call and it returned a true Java object with the full value of pi.
|
Rik <rik5>![]() |
Thu 01 May 2014 09:36:12 PM UTC, comment #2: javachk.m has been submitted in patch #8438 |
Philip Nienhuis <philipnienhuis>![]() |
Sat 19 Apr 2014 07:54:53 PM UTC, comment #1: As to:
The obj.method() variant has worked since at least OF Java package 1.2.x, method(obj) to some extent. The OF io package is pervaded by these call types. E.g., in <io>/inst/private/__UNO_oct2spsh__.m:
where only wsh, sheets and sh_names are Octave types. |
Philip Nienhuis <philipnienhuis>![]() |
Sat 04 May 2013 10:35:40 PM UTC, original submission:
This is a list of incompatibilities between the Java implementation in Matlab and the current implementation in the development version of core Octave (not the Java package from Octave Forge). This is a laundry list which I haven't prioritized.
im2java() function is missing
javaaddpath (-end) functionality
javaclasspath (path) functionality.
java/dlgtest.m should be removed and tests put in %!demo or %!test blocks
Need to figure out how to call
box C++ routine needs to support JavaArrays such as listdlg returning []int.
Is linear indexing of Java Array allowed by Matlab?
unbox routine, does it correctly handle signed versus unsigned?
resize() method for java_object arrays needed in ov-java.cc.
disp() for primitive objects should be better. For example, Matlab is able to display a javaArray when the type is of type java.lang.Double.
SUPPPORT for method(obj) syntax.
clear needs a '-java' option
javachk.m needs implementation
The following routines need to be overloaded in ov-java.cc.
exist needs to be overloaded to return 8 for Java class
which expanded to cover Java methods
|
Rik <rik5>![]() |
No files currently attached
Depends on the following items: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 2 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2016-05-16 | mtmiller | Dependencies | - | ![]() |
bugs #47679 is dependent |
2013-05-04 | rik5 | Carbon-Copy | - | ![]() |
Added jwe |
According to this web page:
http://www.tutorialspoint.com/java/java_serialization.htm
this serialization trick will only work for Java objects that explicitly implement the Serializable interface.
I suppose many Java objects do as they usually are derived from more basic Java classes. But it could be something to watch out for.
Some more info here:
http://www.ibm.com/developerworks/library/j-5things1/