octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #47679] native java object creation and static


From: Ivo
Subject: [Octave-bug-tracker] [bug #47679] native java object creation and static method calls
Date: Tue, 12 Apr 2016 16:47:23 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0

URL:
  <http://savannah.gnu.org/bugs/?47679>

                 Summary: native java object creation and static method calls
                 Project: GNU Octave
            Submitted by: icouckuy
            Submitted on: Tue 12 Apr 2016 04:47:22 PM GMT
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.1
        Operating System: GNU/Linux

    _______________________________________________________

Details:

In Matlab you can directly use java calls in the code to construct java
objects, get and set fields and call static methods:
% static method call
logger = java.util.logging.Logger.getLogger('myLogger');
% object CTor
obj = java.lang.String('hello');

In octave I have to go through javaMethod, javaObject and java_set/get. This
wouldn't be a problem except Matlab doesn't have these and thus I need to add
a lot of if/else clauses to our code.

How hard would it be to enable support for this ? I realize this would create
some disambiguation as the interpreter would need to try and execute the
statement as either a 'Matlab' or 'java' call before it knows the class
actually exists in either environment (VM).

As a sidenote, Matlab supports the import statement too:
import java.lang.*;
obj = String('hello');




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?47679>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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