help-octave
[Top][All Lists]
Advanced

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

embedding a JVM into octave


From: Al Niessner
Subject: embedding a JVM into octave
Date: Thu, 07 Apr 2005 09:40:56 -0700

Sometimes computers behave and sometimes they do not. In this case, they
definitely are not. I have a chunk of Java code that I use for talking
to and controlling hardware. This hardware is distributed over some set
of computers on a private network. I then use XML to describe the
hardware layout to the Java. Now, I would like to command this hardware
in some way that makes with Octave as my math engine (think labview kind
of thing). The communications is non-trivial because the system is
distributed but works well (it has been tested) using the Java I have.
What I would like to now is call this Java code using octave. I did not
think it would be that hard really, but it is turning out to be a lot
more difficult than I had suspected.

To start with, I wrote a library (commandInterface.h is attached) that
creates a JVM. It then looks up the necessary classes and methods it
needs to do the communications. I wanted to test this quickly so I wrote
a small C++ program to do this (commandInterfaceTest.cxx is attached).
It works just fine. I then wrote the first of many OCT files (tbcInit.cc
is attached) and it does not work. Why? All inputs are the same and
absolute file names are used in the class path. Is Octave doing
something that I need to know about? The JVM starts, but I cannot find
any of the classes that I need and they are all in the class path as I
can prove with commandInterfaceTest. This leaves me with just the option
that Octave is somehow interfering with the JVM, but I do not know how.
Any and all help is appreciated.

The error I get is: "Can't find the class
gov.nasa.jpl.testbed.command.impl.ExternalToolInterfaces"

It is easy to tell from reading the initialization function (initFunc.cc
is attached) that the JVM should have started successfully and the
environment is not NULL. If it were, then I would expect a segmentation
fault not a failed class name look-up.

Again, any and all help is much appreciated.

-- 
Al Niessner
818.354.0859

All opinions stated above are mine and do not necessarily reflect those
of JPL or NASA.

--------
|  dS  | >= 0
--------

Attachment: commandInterface.h
Description: Text Data

Attachment: commandInterfaceTest.cxx
Description: Text Data

Attachment: tbcInit.cc
Description: Text Data

Attachment: initFunc.cxx
Description: Text Data


reply via email to

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