You could try this way:

  • Use Jython instead of CPython to write Python code http://www.jython.org.
  • Integrate Jython code with Java code through Apache Bean Scripting Framework http://commons.apache.org/bsf/

If you definitely need to use CPython, then Apache Trift could be interesting for you: http://thrift.apache.org/ So you could make additional scalable abstraction layer and integrate your Java code with different languages (not only Python)

If you need a really low-level interface you could look at JNI http://java.sun.com/docs/books/jni/ for investigation. But I think it will take a lot of time to integrate your code with CPython using JNI.

Answer from Vladislav Bauer on Stack Overflow
🌐
pytz
pythonhosted.org › javabridge › highlevel.html
High-level API — python-javabridge 1.0.12 documentation
The functions make_new and make_method create Python methods that wrap Java constructors and methods, respectively. The function can be used to create Python wrapper classes for Java classes.
🌐
Huihoo
docs.huihoo.com › homepage › dkuhlman › generate_wrappers.html
Python/Java Wrapper Generator - Huihoo
generate_wrappers.py generates support files that enable Python to use the classes and methods in a Java source code file.
🌐
Reddit
reddit.com › r/programmerhumor › python wrapper for java
r/ProgrammerHumor on Reddit: Python wrapper for Java
December 29, 2019 - SWIG isn't cross language to Python, it's cross language to C/C++. Python is one common use, but it's also used to communicate between C++ and Java, and other languages.
🌐
Quora
quora.com › What-is-a-simple-example-of-wrapping-a-Java-library-with-Python
What is a simple example of wrapping a Java library with Python? - Quora
Answer: You could try this way: Use Jython instead of CPython to write Python code www.jython.org Integrate Jython code with Java code through Apache Bean Scripting Framework commons.apache.org/bsf/ If you definitely need to use CPython, then Apache Trift could be interesting for you: Apache T...
🌐
motmaytinh
quytran.is-a.dev › 2019 › 06 › how-i-wrote-a-python-wrapper-for-java-implementation-of-vncorenlp
How I wrote a python wrapper for Java implementation of VnCoreNLP • Tran Ngoc Quy
Create a new python file in the folder __init__, in my case I named it vncorenlp.py ... It’s the standard library that you must import if you want to call a Java instance. Now, let’s construct a class for the wrapper.
🌐
Py4j
py4j.org
Welcome to Py4J — Py4J
Py4J enables Python programs running in a Python interpreter to dynamically access Java objects in a Java Virtual Machine. Methods are called as if the Java objects resided in the Python interpreter and Java collections can be accessed through standard Python collection methods.
Find elsewhere
🌐
GitHub
github.com › thouis › Python-Java-Bridge
GitHub - thouis/Python-Java-Bridge: python wrapper for the Java Native Interface
python wrapper for the Java Native Interface. Contribute to thouis/Python-Java-Bridge development by creating an account on GitHub.
Author   thouis
🌐
GitHub
github.com › LeeKamentsky › python-javabridge
GitHub - LeeKamentsky/python-javabridge: Python wrapper for the Java Native Interface
Python wrapper for the Java Native Interface. Contribute to LeeKamentsky/python-javabridge development by creating an account on GitHub.
Starred by 117 users
Forked by 64 users
Languages   Python 93.1% | Cython 4.4% | C 1.5% | Python 93.1% | Cython 4.4% | C 1.5%
🌐
Orekit
forum.orekit.org › orekit python wrapper usage
Adding java classes to Orekit python wrapper as a second Python extension - Orekit Python Wrapper usage - Orekit
January 8, 2023 - Due to one of the requirements ... FixedStepHandlers so the code doesn’t have to switch between the Java VM and the Python VM as much. In order to use these classes in Python I originally rebuilt the whole wrapper with a similar script to the one in conda-forge but adding an extra ...
🌐
Jython
jython.org
Home | Jython
import org.python.util.PythonInterpreter; public class JythonHelloWorld { public static void main(String[] args) { try(PythonInterpreter pyInterp = new PythonInterpreter()) { pyInterp.exec("print('Hello Python World!')"); } } } from java.lang import System # Java import print('Running on Java version: ' + System.getProperty('java.version')) print('Unix time from Java: ' + str(System.currentTimeMillis()))
🌐
PyPI
pypi.org › project › java-access-bridge-wrapper
java-access-bridge-wrapper · PyPI
Python wrapper around the Java Access Bridge / Windows Access Bridge.
      » pip install java-access-bridge-wrapper
    
Published   Nov 23, 2025
Version   2.0.0
🌐
PyPI
pypi.org › project › javabridge
javabridge · PyPI
pip install javabridge Copy PIP instructions · Latest version · Released: May 26, 2020 · Python wrapper for the Java Native Interface · These details have been verified by PyPI · anne-broadinstitute Lee.Kamentsky ljosa thouis · These details have not been verified by PyPI ·
      » pip install javabridge
    
Published   May 26, 2020
Version   1.0.19
🌐
GitHub
github.com › 313hemant313 › wrappyj
GitHub - 313hemant313/WrapPyJ: Auto forge Java wrappers for any Python library
WrapPyJ is a Java wrappers generator for Python libraries, enabling seamless integration of Python functionality within Java applications.
Author   313hemant313
🌐
GitHub
github.com › agrias › javapy
GitHub - agrias/javapy: Python wrapper for Java/Scala using native libraries
July 11, 2019 - Python wrapper for Java/Scala using native libraries
Author   agrias
🌐
Baeldung
baeldung.com › home › java › how to call python from java
How to Call Python From Java | Baeldung
August 27, 2025 - Learn the most common ways of calling Python code from Java.
🌐
pytz
pythonhosted.org › javabridge › java2python.html
Calling Python from Java — python-javabridge 1.0.12 documentation
Use execute in place of exec to call Python from a javabridge CWrapper for CPython.
🌐
Medium
medium.com › graalvm › supercharge-your-java-apps-with-python-ec5d30634d18
Supercharge Your Java Apps with Python | by Tim Felgentreff | graalvm
May 5, 2023 - Learn how you can use Python and Python libraries in your Java applications based on the example app with data visualization libraries!
🌐
Python
wiki.python.org › moin › IntegratingPythonWithOtherLanguages
IntegratingPythonWithOtherLanguages
July 29, 2020 - bedevere - Python wrapper to GNU Prolog http://bedevere.sourceforge.net/ pwig includes examples of wrapping Python for SWI-Prolog. pyswip is a ctypes based module that enables querying SWI-Prolog. See also http://www.google.com/search?hl=en&lr=&ie=ISO-8859-1&q=Python+prolog · Jython - Python implemented in Java ·