Python library to access Java classes (ctypes/cffi-based PyJNIus)
Currently only as placeholder (because a base package jtypes.jvm is still in development)
Python library for accessing Java classes
jtypes.pyjnius is a bridge between Python and Java, allowing these to intercommunicate.It is an effort to allow python programs full access to Java class libraries.jtypes.pyjnius is a lightweight Python package, based on the ctypes or cffi library.It is an almost fully compliant implementation of Mathieu Virbel’s and Gabriel Pettier’s PyJNIus package by reimplementing whole its functionality in a clean Python instead of Cython.
Note from the original website:
PyJNIus is a Python library for accessing Java classes.
A minimal PyJNIus example looks something like this:
Quick overview>>> from jnius import autoclass >>> System = autoclass('java.lang.System') >>> System.out.println('Hello world') Hello world >>> Stack = autoclass('java.util.Stack') >>> stack = Stack() >>> stack.push('hello') >>> stack.push('world') >>> print(stack.pop()) world >>> print(stack.pop()) hello
- Either the Sun/Oracle JRE/JDK or OpenJDK.
pip install --upgrade jtypes.pyjnius
To ensure everything is running correctly you can run the tests using
python -m jt.jnius.tests
- Python 2.7 or higher or 3.3 or higher
- pip or setuptools
Copyright (c) 2014-2017 Adam KarpierzLicensed under the MIT LicensePlease refer to the LICENSE file.
- Documentation update.
- First beta release.
- Initial version.