Skip to main content

Python bridge for the Java Native Interface.

Project description

jni

Python bridge for the Java Native Interface.

Overview

jni is a complete bridge between Python and Java JNI.
It is an effort to allow python programs full access to Java JNI API.

PyPI record.

Documentation.

jni is a lightweight Python package, based on the ctypes, or cffi library, or Cython wrapper (currently under development).
It is done by implementing whole JNI API functionality in a clean Python instead of C/C++.
jni also contains a JNI wrapper in pure C based on Python C-API (currently under development) - mainly for performance reasons.

What is jni:

jni is an effort to allow python programs full access to Java JNI API.
This is achieved not through re-implementing Python, as Jython has done, but rather through interfacing at the native level in both virtual machines.
Known Bugs/Limitations :
  • Because of lack of JVM support, you cannot shutdown the JVM and then restart it.

Installation

Prerequisites:

To install run:

python -m pip install --upgrade jni

Development

Prerequisites:

  • Development is strictly based on tox. To install it run:

    python -m pip install --upgrade tox

Visit Development page.

Installation from sources:

clone the sources:

git clone https://github.com/karpierz/jni.git jni

and run:

python -m pip install ./jni

or on development mode:

python -m pip install --editable ./jni

License

Copyright (c) 2004-2025 Adam Karpierz
Licensed under CC BY-NC-ND 4.0
Licensed under proprietary License
Please refer to the accompanying LICENSE file.

Authors

Changelog

1.2.0b1 (2025-06-17)

  • Add support for Python 3.14

  • Add support for PyPy 3.11

  • Drop support for Python 3.9 (due to compatibility issues).

  • Drop support for PyPy 3.9

  • Drop support for Oracle Java 1.8 (jdk, jre) due to licensing issues
    and the end of support from Oracle.
  • Update readthedocs’s python to version 3.13

  • Update tox’s base_python to version 3.13

  • The distribution is now created using ‘build’ instead of ‘setuptools’.

  • Copyright year update.

  • Setup (dependencies) update.

1.1.0b6 (2024-12-01)

  • Fixes for embedded python.

  • Java 17 is now the primary build/test environment.

  • Add support for Python 3.13

  • Drop support for Python 3.8

  • jni.c and pvm.c (useful for embedded python apps) have been added.

  • Unittest have been performed for much more JVMs.

  • Tox configuration is now in native (toml) format.

  • Setup fixes.

  • Setup (dependencies) update.

1.0.0b22 (2024-01-26)

  • Tox configuration has been moved to pyproject.toml

  • Setup update (now based on tox >= 4.0).

  • Add support for Python 3.10, 3.11 and 3.12

  • Drop support for Python 3.7

  • Add support for PyPy 3.9 and 3.10

  • Copyright year update.

1.0.0b20 (2022-01-29)

  • Drop support for Python 3.6

  • Setup update.

1.0.0b18 (2021-10-13)

  • dll_path argument of load() can also be type os.PathLike.

  • Copyright year update.

  • Setup update.

1.0.0b17 (2020-11-10)

  • Add support for Python 3.9

  • General update, improvements and cleanup.

  • Setup update and improvements.

  • Fixed docs setup.

1.0.0b7 (2020-03-08)

  • Drop support for Python2

  • Update of license info.

  • Setup update.

1.0.0b4 (2019-07-10)

  • Last release for Python2

1.0.0b3 (2018-05-22)

  • Update of the required setuptools version.

1.0.0b2 (2018-02-26)

  • Improvement and simplification of setup and packaging.

1.0.0b1 (2017-11-18)

  • First ‘official’ version.

0.1.1 (2005-10-05)

  • Initial version.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jni-1.2.0b1.tar.gz (250.9 kB view details)

Uploaded Source

Built Distributions

jni-1.2.0b1-pp311-pypy311_pp73-win_amd64.whl (152.7 kB view details)

Uploaded PyPyWindows x86-64

jni-1.2.0b1-pp310-pypy310_pp73-win_amd64.whl (153.7 kB view details)

Uploaded PyPyWindows x86-64

jni-1.2.0b1-cp314-cp314-win_amd64.whl (153.7 kB view details)

Uploaded CPython 3.14Windows x86-64

jni-1.2.0b1-cp313-cp313-win_amd64.whl (149.7 kB view details)

Uploaded CPython 3.13Windows x86-64

jni-1.2.0b1-cp312-cp312-win_amd64.whl (149.8 kB view details)

Uploaded CPython 3.12Windows x86-64

jni-1.2.0b1-cp311-cp311-win_amd64.whl (155.4 kB view details)

Uploaded CPython 3.11Windows x86-64

jni-1.2.0b1-cp310-cp310-win_amd64.whl (135.6 kB view details)

Uploaded CPython 3.10Windows x86-64

File details

Details for the file jni-1.2.0b1.tar.gz.

File metadata

  • Download URL: jni-1.2.0b1.tar.gz
  • Upload date:
  • Size: 250.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for jni-1.2.0b1.tar.gz
Algorithm Hash digest
SHA256 70938d9bd9fe8dd540725740116d23e678aa581ffb3ed3cb8af113cff6f4803d
MD5 c25cdce29b62f022521015ebfc7c6e30
BLAKE2b-256 53a06a82e1f0aa2fe9d87980455349e2ee5e42a18466151b4887e131c87de25c

See more details on using hashes here.

File details

Details for the file jni-1.2.0b1-pp311-pypy311_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for jni-1.2.0b1-pp311-pypy311_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 351a19d6226741d01ced1c3acd8fe9e9e8f382a9ae7c3f1e17812cb461971f59
MD5 deb63c96407160eb075adb34d03238f2
BLAKE2b-256 f5b90f118c7f7e0c5f4962813c74bc29bffadd4c17817c5b4800a4e9d40523d5

See more details on using hashes here.

File details

Details for the file jni-1.2.0b1-pp310-pypy310_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for jni-1.2.0b1-pp310-pypy310_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 4d23452ddbb4f8c84b826dc1ce4016cce5e4546662fc02ffce0e445928d89231
MD5 601bcc734f8bb359792faa2c4d7c1261
BLAKE2b-256 5a257c20d8c75f6a72efaacbcd18a121ff577a5fb34eeadfc23921f85af148e6

See more details on using hashes here.

File details

Details for the file jni-1.2.0b1-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: jni-1.2.0b1-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 153.7 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for jni-1.2.0b1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 55b88b333d91ac205b3c7dc41ae690a133903e80928af94163325d73f0e0c351
MD5 c453d51a2fbad7d0da00610d709a70c4
BLAKE2b-256 af57a2c2641a0a85401677912bd5d5c74d6b6417f70659db0e7f56ceb7d04461

See more details on using hashes here.

File details

Details for the file jni-1.2.0b1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: jni-1.2.0b1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 149.7 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for jni-1.2.0b1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 de195412bcfc3522add30dd81c3bdecd3d49e6845251d884c3fe36f85e2b4aaf
MD5 7d421bc3a2c89de0fc7a729a29bf0b13
BLAKE2b-256 4badd843dfed31ca1d50350bd229b4724b4987baa431d3ac87593949f90b4658

See more details on using hashes here.

File details

Details for the file jni-1.2.0b1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: jni-1.2.0b1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 149.8 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for jni-1.2.0b1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3307d911fc8f848d0737ede1111b544f043207707f8dcef4f9b3ee58e9670069
MD5 25b422b9c152958f62261ac15eade9de
BLAKE2b-256 2429f7fe9c3aa80990bb500257920b1aac287d15ee00f2f84daab88e34f6bc37

See more details on using hashes here.

File details

Details for the file jni-1.2.0b1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: jni-1.2.0b1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 155.4 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for jni-1.2.0b1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8dfc98ba49d29db1cc1eff2632795222c95e5f314faedb506ef30daaa62e66cf
MD5 8d75f6b3c5f000d847560a0fcccd0970
BLAKE2b-256 87eb67189a19a5d92901ece262458000b93f95f9c98dab2f151e7bf17918a7a4

See more details on using hashes here.

File details

Details for the file jni-1.2.0b1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: jni-1.2.0b1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 135.6 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for jni-1.2.0b1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1e986215c5d6f748df50dcd953ec7a72e5bffbf855bc8704fb1c0a5d18afe993
MD5 d5e335e0dcd484673fd06f5260718a28
BLAKE2b-256 2288e5b690f0d7bb307f84872c950056fd091eaffcd5ecbe04131bc0698d53e6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page