Can Java and Python coexist in the same application?

I need a Java instance to retrieve data directly from the Python instance data store. I do not know if this is possible at all. Is the storage transparent / unique, or does each instance (if they can really coexist) have a separate data store? Explanation: How can a Java application retrieve data from a Python application store and vice versa?

+4
source share
2 answers

You can use jython . This is a python implementation written in java. You can call java functions / classes from python this way. This will allow you to run python code in a java instance.

I don't know anything to do the opposite (run java inside the python process).

+6
source

Different versions of the application use a data warehouse, and AFAIK you can still have the Java version of your application and the Python version at the same time. Previously, it was a necessary hack for using functions that were implemented in Python, but not (yet) in Java, and possibly still exist.

Of course, only one of these versions may be the default, but other versions are available.

+9
source

All Articles