4

I am writing my project using python 3.x. I've come to a stage where I needed to write some code in Java.Is there anyway to integrate Python 3.x and Java? I am acknowledged about Jython.But it does not support Python 3.x as i know. Thanks in advance.

Mahir Mahbub
  • 126
  • 1
  • 11
  • 1
    Integrate what exactly? What are you trying to do? Do you need to call one from the other, exchange data, ...? And why do you need to mix languages? – UnholySheep May 15 '17 at 06:41
  • This is a duplicate question you can see in this post : http://stackoverflow.com/questions/9880736/integration-of-java-and-python-code-in-one-eclipse-project – bttX May 15 '17 at 08:29
  • My project needs to use cross languages.I need to write some part of my project in java and some part in python 3. @UnholySheep – Mahir Mahbub May 15 '17 at 17:40
  • That question was about the integration of python 2 and java. Answer was to use jython.But Jython do not support Python 3. First understand the question then comment! bttX @bttX – Mahir Mahbub May 15 '17 at 17:43
  • 2
    You still didn't explain what exactly your two programs are supposed to do with each other. Without that information it's impossible to give you a clear answer (though this question is most likely too broad anyway) – UnholySheep May 15 '17 at 17:53

1 Answers1

1

Here are two projects that use JNI to connect the standard python interpreter into a JVM, both projects support python 3.

I would recommend starting with JPy since you currently have python and it allows you to call java from python.

bsteffen
  • 371
  • 2
  • 9