|
From: <jem...@fr...> - 2018-11-13 17:20:56
|
To invoke your Jython program from C++ you have two options:
1) Easy - Invoke jython as a separater process: for example,
system("jython yourpythoncode.py inputfilename outputfilename");
2) Hard - Use JNI to embed a Java runtime in your C++ program,
instantiate the runtime, tell it to execute the Jython interpreter with
your files.
On Mon, 12 Nov 2018 14:15:08 +0530, Balanand Jha <bal...@gm...>
wrote:
> Hello everyone,
> I created a little project in jython using one Java library (owlapi5.1)
> and one python library (dendropy) along with other built in jython
> functions for string and file i/o operations. The program is working
fine
> on itself from within the eclipse environment. Now I want to
> integrate/call (or whatever it is called technically) from my main C++
> project which I am developing using visual studio IDE (.NET framework is
> _NOT_ involved). What my jython program does is to take a simple text
> file as input and converts its format and saves it as another text file.
> I want to generate that input file from my C++ project, call jython
> program and pass this file to it (directly or though file system), and
> let jython program save the output file to the disc.
> I am completely new to the jython concept and do not have a slightest
> idea of how this can be done. Any help would be greatly appreciated.
> Thanks in advance.
> Bala
|