bugGNU Octave - Bugs: bug #50299, Java interface: Ordering and...

 
 

bug #50299: Java interface: Ordering and Headlines

Submitter:  Ernst Reissner <ernstreissner>
Submitted:  Tue 14 Feb 2017 10:09:10 AM UTC
   
 
Category:  Documentation Severity:  2 - Minor
Priority:  3 - Low Item Group:  Documentation
Status:  Fixed Assigned to:  siko1056
Originator Name:  Ernst Reissner Open/Closed:  * Closed
Release:  * 4.2.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 20 Feb 2017 05:13:04 PM UTC, comment #8: 
Kai Torben Ohlhus <siko1056>
Group Member
Mon 20 Feb 2017 09:52:03 AM UTC, comment #7: 

First of all: discussion on my bugfixes to the java interface
great idea of you.
Finishing this bug first: also good.

Detail:
you write that

    javaObject ("java.math.BigDecimal", "1").divide (javaObject
    ("java.math.BigDecimal", "1000000"))
    .multiply (javaObject ("java.math.BigDecimal", "1000001")).
    toString ()
    ans = 1.000001
    >> class(ans)
    ans = char

is not what you get.
Yes, I made a mistake.... Please leave out the hint.
To get it right, it is too complicated
and I found another bug in the java platform.
Let us close this.



Ernst Reissner <ernstreissner>
Sun 19 Feb 2017 02:44:18 PM UTC, comment #6: 

Some minor corrections regarding the usage of pxref --> ref. See new revision.

(file #39789)

Kai Torben Ohlhus <siko1056>
Group Member
Sun 19 Feb 2017 12:55:36 AM UTC, comment #5: 

Thank you very much for you contribution for the docs (comment #3).  The tutorial is great!  I reviewed the text (according to your E-Mail, I assume, we are both Germans) and

- put a bit of my idea of English into your text
- formatted it more texinfo like (@result{}, xref, ...)
- rephrased comparison with features of Matlab (static members) in a neutral way and preserving the information

all hopefully without changing too much of your original work.

I think we are almost done and can commit your work. Two things are left:

1. You agree on my changes (those happened mostly in your tutorial).

2. I don't get the output for one example:


>> javaObject ("java.math.BigDecimal", "1").divide (javaObject ("java.math.BigDecimal", "1000000")).multiply (javaObject ("java.math.BigDecimal", "1000001")).toString ()
ans = 1.000001
>> class(ans)
ans = char


I am using JVM 1.7 or 1.8. Don't really often use it. So can you confirm that this works for you and how can this be made working for me? Otherwise, it can simply be omitted.


Regarding comment #4. I read about your contributions, but like I just said, I don't really use Java a lot to be a good reviewer of the changes and preferred to spend my time on other Octave issues. I propose the following: when we got this item done (and some of you other documentation changes, we start a discussion on the maintainers list next week, where you guide me through your patches and bugfixes and push them to development branch "default" where the don't do too much harm.

(file #39785)

Kai Torben Ohlhus <siko1056>
Group Member
Sat 18 Feb 2017 09:35:51 PM UTC, comment #4: 

Hello Kai, I would like to point you to the fact,
that I posted a lot of bug reports for the java interface
and also patches which wait for being included for quite a long time.

I would appreciate you applying them. Thank you a lot.


Also I would like to go on improving the docs
of the java interface.

Ernst Reissner <ernstreissner>
Sat 18 Feb 2017 03:01:12 AM UTC, comment #3: 

I provided two patches.
Well, I think they improve docs a little
but give rise to further questions.


(file #39778, file #39779)

Ernst Reissner <ernstreissner>
Wed 15 Feb 2017 01:59:24 PM UTC, comment #2: 

I agree with your arguments. New order of the chapter and changes:

A.4.2
A.4.3 -- Poor example, expand to a real life minimal example (that gets deployed in "/examples/code/example.jar"
A.4.4 -- Poor title, my suggestion "Passing parameters to the JVM"
A.4.1

Do you know how to provide a cset for this? I don't have much time to spend on this at the moment, but I will review and push your changes.

Kai Torben Ohlhus <siko1056>
Group Member
Tue 14 Feb 2017 11:27:15 AM UTC, comment #1: 

Maybe instead of A.4.3 Creating an Instance of a Java Class
one could provide a working example:
A.4.3 Accessing Java from within Octave
which treats creation of an object,
invoking a method, setting and getting the value of a field.
Also some hint on type conversion would be fine.

Ernst Reissner <ernstreissner>
Tue 14 Feb 2017 10:09:10 AM UTC, original submission:  

The java interface is treated in Section A.4.
The subsections are (in the order given):
- A.4.1 Java Interface Functions
- A.4.2 Making Java Classes Available
- A.4.3 Creating an Instance of a Java Class
- A.4.4 Handling Java Memory Limitations

I think, A.4.2 should come first
as it describes how to configure octave
that any java-class can be found.
You cannot apply any serious java interface function (described in A.4.1) without that.

The headline of Section A.4.4 is very misleading.
The content is about passing parameters to the java virtual machine (JVM)
and so the headline should be something like
"Passing parameters to the java engine"

Next one could read A.4.3 "Creating an instance of a Java Class".
Here I would explain that the function javaObject
invokes the constructor of the class with name given
and parameters given.
Also one should mention that octave double/int
are automatically converted into according java types
before passing to the constructor.
Also java objects can be stored in octave variables.

Actually, here a section is missing on type conversions
between java and octave.
Matlab provides extensive documentation here,
which simply misses for octave.

Section A.4.1 should be the final section
summarizing the functions which form the java interface.

Ernst Reissner <ernstreissner>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #39789:  bug50299_review2.patch added by siko1056 (22KiB - text/x-patch)
file #39785:  bug50299_review1.patch added by siko1056 (22KiB - text/x-patch)
file #39778:  bug50299_1.patch added by ernstreissner (14KiB - text/x-patch)
file #39779:  bug50299_2.patch added by ernstreissner (12KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by siko1056 (Updated the item)
  • -email is unavailable- added by ernstreissner (Submitted the item)
  • -email is unavailable- added by ernstreissner
  •  

    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.

    Only group members can vote.

     

    Follow 14 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-02-20 siko1056 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2017-02-19 siko1056 Attached File- Added bug50299_review2.patch, #39789
    2017-02-19 siko1056 Attached File- Added bug50299_review1.patch, #39785
        StatusNeed Info Patch Submitted
    2017-02-18 ernstreissner Attached File- Added bug50299_1.patch, #39778
        Attached File- Added bug50299_2.patch, #39779
    2017-02-15 siko1056 StatusConfirmed Need Info
    2017-02-15 siko1056 Assigned toNone siko1056
    2017-02-14 siko1056 Severity3 - Normal 2 - Minor
        Priority5 - Normal 3 - Low
        Item GroupNone Documentation
        StatusNone Confirmed
    2017-02-14 ernstreissner Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code