javaOctave

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

javaOctave

Bryant Chhun
Hi Octave community,

I have a java application/GUI that should send data to Octave, perform calculations, and then receive the result.

I've tried javaOctave as described here (https://www.gnu.org/software/octave/doc/interpreter/Java-Interface.html).  My current problem is described below, but a general problem is that the wiki was hosted through kenai, which Oracle decommissioned not long ago.  At some point i'll give the other suggested library, joPAS, a go...

For those familiar with javaOctave: my current problem is that Octave does not seem to recognize its own data types.  Below is a stack trace from a script run through beanshell.  This same error occurs when trying to pass an OctaveDouble to the OctaveEngine.

Target exception: dk.ange.octave.exception.OctaveParseException: Unknown type, class dk.ange.octave.type.OctaveString

dk.ange.octave.exception.OctaveParseException: Unknown type, class dk.ange.octave.type.OctaveString
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at dk.ange.octave.exec.OctaveExec.reInstantiateException(OctaveExec.java:183)
at dk.ange.octave.exec.OctaveExec.getFromFuture(OctaveExec.java:164)
at dk.ange.octave.exec.OctaveExec.eval(OctaveExec.java:131)
at dk.ange.octave.io.OctaveIO.set(OctaveIO.java:56)
at dk.ange.octave.OctaveEngine.put(OctaveEngine.java:139)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at bsh.Reflect.invokeMethod(Reflect.java:131)
at bsh.Reflect.invokeObjectMethod(Reflect.java:77)
at bsh.Name.invokeMethod(Name.java:852)
at bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:69)
at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:96)
at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:41)
at bsh.Interpreter.run(Interpreter.java:471)
at java.lang.Thread.run(Unknown Source)
Caused by: dk.ange.octave.exception.OctaveParseException: Unknown type, class dk.ange.octave.type.OctaveString
at dk.ange.octave.io.OctaveIO.write(OctaveIO.java:182)
at dk.ange.octave.io.OctaveIO.write(OctaveIO.java:195)
at dk.ange.octave.io.DataWriteFunctor.doWrites(DataWriteFunctor.java:53)
at dk.ange.octave.exec.OctaveWriterCallable.call(OctaveWriterCallable.java:56)
at dk.ange.octave.exec.OctaveWriterCallable.call(OctaveWriterCallable.java:27)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknobsh % wn Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
... 1 more

Any advice is appreciated!

Best

Bryant

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: javaOctave

Mike Miller-4
On Mon, Jun 12, 2017 at 14:41:36 -0700, Bryant Chhun wrote:

> Hi Octave community,
>
> I have a java application/GUI that should send data to Octave, perform
> calculations, and then receive the result.
>
> I've tried javaOctave as described here (
> https://www.gnu.org/software/octave/doc/interpreter/Java-Interface.html).
> My current problem is described below, but a general problem is that the
> wiki was hosted through kenai, which Oracle decommissioned not long ago.
> At some point i'll give the other suggested library, joPAS, a go...
>
> For those familiar with javaOctave: my current problem is that Octave does
> not seem to recognize its own data types.  Below is a stack trace from a
> script run through beanshell.  This same error occurs when trying to pass
> an OctaveDouble to the OctaveEngine.

Unfortunately I don't think you will find much help. The JavaOctave
project is linked as a suggestion in the Octave manual, but we have no
association or expertise with that project. Now it looks like the web
site is gone and the project is no longer active. My guess is that it
used to work with a much older version of Octave but is not compatible
with recent releases.

If you can find a current working Java-to-Octave bridge, we can fix the
recommendations in the manual, please keep us updated.

--
mike

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave