Is it possible to use Java and Python at the same time in App Engine?

For the same registered application in App Engine, is it possible to have Java and Python applications? "

+4
source share
2 answers

I had the same need a week ago or so, and found a solution: Can Java and Python coexist in the same application?

EDIT: I accepted the first answer, but it happens that the second answer gave me the best results, as I explain the comments there.

EDIT 2: Well, this may not be exactly the same as what I need only to access a single data store. If you want Java and Python to work side by side, I think Jython would be a better solution, like the larsmans mentioned above.

+1
source

Use py4j to communicate with java and python, and you only need the secret id or user id to connect to the google engine. But if you need a standalone application for both, you will need a yaml file and their configuration.

from py4j.java_gateway import JavaGateway gateway = JavaGateway() # connect to the JVM gateway.jvm.java.lang.System.out.println('Hello World!') 

Alternatively, you can use the google engine plugin for eclipse (if you use) and deploy the java project with run-> run as-> Google Web Application and integrate python with Jython. https://developers.google.com/eclipse/docs/creating_new_webapp?hl=en

0
source

All Articles