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
🌐
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.
Discussions

Adding java classes to Orekit python wrapper as a second Python extension
Hi, I have been using Orekit for a while, and for a new project I decided to try using the Python wrapper. Due to one of the requirements being that the code must be reasonably optimized, I had to write some java classes to be used as FixedStepHandlers so the code doesn’t have to switch between ... More on forum.orekit.org
🌐 forum.orekit.org
0
0
January 8, 2023
Python wrapper and interfaces/types/
Hi there 🙂 I’m trying to adapt my code (previously only using Java) in python using the Orekit Python wrapper (thanks a lot to those who developed it), it works well but I have some trouble for adapting some specidif parts of the code. For example, in Java, we can have the following method ... More on forum.orekit.org
🌐 forum.orekit.org
0
0
February 11, 2020
Use java library from python (Python wrapper for java library) - Stack Overflow
I have a java library in jar form which can be used to extract data from files(excel,xml etc). As its in java, it can be used only in java applications. But i need the same library to be used for p... More on stackoverflow.com
🌐 stackoverflow.com
Python wrapper for Java

Is there a handle for interfacing?

More on reddit.com
🌐 r/ProgrammerHumor
46
2965
December 29, 2019
🌐
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 ...
🌐
Huihoo
docs.huihoo.com › homepage › dkuhlman › generate_wrappers.html
Python/Java Wrapper Generator - Huihoo
When you run generate_wrappers.py, it prints out a message telling you where (in which files) to add your adapter code. Run make to generate and compile additional code. Run Python to test your code. Repeat steps 2 through 4 as necessary. Python: The Python home page. gcj: The GNU Compiler for the Javatm Programming Language
🌐
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.
🌐
Baeldung
baeldung.com › home › java › how to call python from java
How to Call Python From Java | Baeldung
August 27, 2025 - In this tutorial, we’ll take a look at some of the most common ways of calling Python code from Java.
🌐
GitHub
github.com › LeeKamentsky › python-javabridge
GitHub - LeeKamentsky/python-javabridge: Python wrapper for the Java Native Interface
The javabridge Python package makes it easy to start a Java virtual machine (JVM) from Python and interact with it.
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%
Find elsewhere
🌐
Py4j
py4j.org
Welcome to Py4J — Py4J
Here is a brief example of what you can do with Py4J. The following Python program creates a java.util.Random instance from a JVM and calls some of its methods.
🌐
W3Schools
w3schools.com › java › java_wrapper_classes.asp
Java Wrapper Classes
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP, Bootstrap, Java, XML and more.
🌐
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()))
🌐
GitHub
github.com › agrias › javapy
GitHub - agrias/javapy: Python wrapper for Java/Scala using native libraries
July 11, 2019 - JavaPy allows you to invoke python using your local python installation from the JVM and get a String response. If you need access to objects this is probably not for you. Otherwise this seems to be the simplest and the most easy to understand ...
Author   agrias
🌐
pytz
pythonhosted.org › tasselpy › tutorial › py_java_basics.html
Running Java through Python — TASSELpy 0.21 documentation
The wrapper now allows access to the Java object just like in Java. >>> aString.getClass().getName() u'java.lang.String' >>> aTaxon.getClass().getName() u'net.maizegenetics.taxa.Taxon' >>> aTaxon.getName() u'jabberwocky' As usual, help can be accessed interactively using Python’s built-in help() function.
🌐
CodingTechRoom
codingtechroom.com › question › -python-wrapper-java-library
How to Create a Python Wrapper for a Java Library - CodingTechRoom
Learn how to write a Python wrapper for a Java library using Jython and Py4J. Step-by-step instructions and best practices included.
🌐
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 - Hi, I have been using Orekit for a while, and for a new project I decided to try using the Python wrapper. Due to one of the requirements being that the code must be reasonably optimized, I had to write some java classes to be used as FixedStepHandlers so the code doesn’t have to switch between ...
🌐
Orekit
forum.orekit.org › orekit python wrapper usage
Python wrapper and interfaces/types/ - Orekit Python Wrapper usage - Orekit
February 11, 2020 - Hi there 🙂 I’m trying to adapt my code (previously only using Java) in python using the Orekit Python wrapper (thanks a lot to those who developed it), it works well but I have some trouble for adapting some specidif parts of the code. For example, in Java, we can have the following method : /** Add a measurement to a list if it has non-zero weight.
🌐
PyPI
pypi.org › project › java-access-bridge-wrapper
java-access-bridge-wrapper · PyPI
jab_wrapper.switch_window_by_title("Frame title") context_tree = ContextTree(jab_wrapper) Install Invoke, Poetry and the other required dependencies in order to be able to develop and package the library: pip install -Ur requirements.txt. If you want to isolate these from the other projects and not rely on the OS Python, enable a (pyenv) virtual environment first by following these instructions.
      » pip install java-access-bridge-wrapper
    
Published   Nov 23, 2025
Version   2.0.0
🌐
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.
🌐
Medium
medium.com › geekculture › how-to-execute-python-modules-from-java-2384041a3d6d
How To Execute Python Modules From Java | by Galina Blokh | Geek Culture | Medium
July 14, 2022 - Example of how to run python3.9 functions from Java Jep · The printouts will be the same as for the Python 3.8 version. That’s all folks!! In this tutorial, you got clear instructions on how to execute your Python code from any Java application for Python 3.8 and Python 3.9 versions.
🌐
Processing
py.processing.org › tutorials › python-jython-java
Python, Jython and Java \ Tutorials
Python Mode for Processing extends the Processing Development Environment with the Python programming language.