I am using Jython within a Java project.
I have one Java class: myJavaClass.java
and one Python class: myPythonClass.py
public class myJavaClass{
public String myMethod() {
PythonInterpreter interpreter = new PythonInterpreter();
//Code to write
}
}
The Python file is as follows:
class myPythonClass:
def abc(self):
print "calling abc"
tmpb = {}
tmpb = {'status' : 'SUCCESS'}
return tmpb
Now the problem is I want to call the abc()
method of my Python file from the myMethod
method of my Java file and print the result.