> I am currently trying to understand the difference between thread and
> process. Is it true that Process can only be invoked from an
> executable command but never from a dynamic library?
In general, it's true that the process you invoke will get its code from
an executable file -- possibly in conjunction with one or more dynamic
libraries. You can't invoke a dynamic library as its own process. (I'm
ignoring a certain complicated exception to this rule on the Windows
operating system; you should, too.)
If you really meant what you said -- invoked "from" -- then you're
incorrect. It doesn't matter whether the code that actually invokes the
process is in a library or not.
> By "1. Run the Fortran code as a separate process. ", do you mean I
> have to change the fortran code into an ".exe"?
Either that or write another program to call it. That other program
could even be written in Java; what matters is that it's a separate
process, so you can get its standard output as a stream.
> For "2. Change something so that the Fortran code isn't really
> printing to stdout", do you mean modify fortran code to write to a
> file, or return a string to C and then to Java?
It's a general strategy. Use a file, or a string, or a named pipe, or
whatever. The point is that you can't redirect your Fortran code's
stdout from Java, so you'll have to do something in either the C++ or
Fortran code.

Signature
Chris Smith
Jamaica R. - 06 May 2007 22:29 GMT
> <rebecca.shu...@gmail.com> wrote:
> > I am currently trying to understand the difference between thread and
[quoted text clipped - 29 lines]
> --
> Chris Smith
Thank you!
I'll try on a seperate simple Java app first...
Jamaica