Skip to content

Instantly share code, notes, and snippets.

View pozdneev's full-sized avatar

Alexander Pozdneev pozdneev

View GitHub Profile
@pozdneev
pozdneev / README.md
Created June 4, 2020 16:40 — forked from bartdag/README.md
Py4J - Multiple GatewayServer and CallbackServer instances

Py4J Multiple GatewayServer and CallbackServer instances

Compile and run TestApplication.java with py4j.jar in your classpath.

Then execute python3 test.py

Explanations

This creates three pairs of GatewayServer and CallbackServer with different ports on both the Java and Python sides. Python is driving the communication by asking Java to print