[Top][All Lists]

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

octave from java

From: frank buloup
Subject: octave from java
Date: Fri, 15 Apr 2011 10:47:11 +0200
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; fr; rv: Gecko/20110303 Thunderbird/3.1.9


I'm trying to use Octave from java but I'm facing a strange problem that have already been encountered. From java program, I'm using Runtime exec to start an external process, getting back input, output and error streams; sending command using output stream and parsing the result from input stream. Everything is working fine until a bad command is sent to Octave (a command containing a call to a function from a package that has not been installed for instance) : octave seems to crash
and I 've not found any log file that could help me to debug something.

This problem has already been encountered, please see thread :

Two points are mentioned from this thread :

1) Something has already been done in python using pipes or sockets - At the begining of the thread 2) Using Runtime exec approach, you must use "--interactive" option and read data in bytes - At the end of the thread

My questions :

1) Is anybody know how to use pipes or sockets and can give me some links, starting points
that could help me ?

2) I did not understood the read "data in bytes". There is no ByteBufferedReader class and from a BufferedReader there exist only a read(char[],offset,length) method, but it reads chars,
not bytes !!! Must we use a BufferedInputStream instead ?

Thanks a lot for your help,

reply via email to

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