Skip to main content

A Python to Java bridge (ctypes/cffi-based JPype).

Project description

Currently only as placeholder (because a base package jtypes.jvm is still in development)

jtypes.jpype

A Python to Java bridge.

Overview

jtypes.jpype 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.

PyPI record.

jtypes.jpype is a lightweight Python package, based on the ctypes or cffi library.
It is an almost fully compliant implementation of Steve Menard’s JPype package by reimplementing whole its functionality in a clean Python instead of C/C++.

About JPype:

Borrowed from the original website:

JPype is an effort to allow python programs full access to java class libraries.
This is achieved not through re-implementing Python, as Jython/JPython has done, but rather through interfacing at the native level in both virtual machines.

Eventually, it should be possible to replace Java with python in many, though
not all, situations. JSP, Servlets, RMI servers and IDE plugins are good candidates.

Known Bugs/Limitations

  • Java classes outside of a package (in the <default>) cannot be imported.

  • Because of lack of JVM support, you cannot shutdown the JVM and then restart it.

  • Some methods rely on the “current” class/caller.
    Since calls coming directly from python code do not have a current class, these methods do not work.
    The User Manual lists all the known methods like that.

Requirements

  • Either the Sun/Oracle JRE/JDK or OpenJDK.

Installation

Prerequisites:

To install run:

python -m pip install --upgrade jtypes.jpype

To ensure everything is running correctly you can run the tests using:

python -m jt.jpype.tests

Development

Visit development page

Installation from sources:

Clone the sources and run:

python -m pip install ./jtypes.jpype

or on development mode:

python -m pip install --editable ./jtypes.jpype

Prerequisites:

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

    python -m pip install tox

License

Copyright 2013-2018 Adam Karpierz

Licensed under the Apache License, Version 2.0
Please refer to the accompanying LICENSE file.

Authors

Changelog

0.6.3b3 (2018-11-08)

  • Synchro with JPype master branch.

  • Update of the required setuptools version.

  • Minor setup and tests improvements.

0.6.3b1 (2018-05-22)

  • Synchro with JPype master branch.

  • Update of the required setuptools version.

0.6.2b5 (2018-03-13)

  • Improvement and simplification of setup and packaging.

0.6.2b3 (2018-01-29)

  • Development moved to github.

  • General improvements and update.

0.6.2b1 (2017-01-19)

  • Synchro with JPype release.

0.6.1b3 (2017-01-01)

  • Third beta release.

0.6.1b1 (2016-12-04)

  • Second beta release.

0.6.1b1 (2016-09-24)

  • First beta release.

0.1.1b0 (2013-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

jtypes.jpype-0.6.3b3.zip (461.0 kB view details)

Uploaded Source

File details

Details for the file jtypes.jpype-0.6.3b3.zip.

File metadata

  • Download URL: jtypes.jpype-0.6.3b3.zip
  • Upload date:
  • Size: 461.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for jtypes.jpype-0.6.3b3.zip
Algorithm Hash digest
SHA256 aa746570b5f3fa497d666fe8e982a74741ed3f41e59937f75116cf48063319dc
MD5 141284a96432584bda7252f92fa5d79d
BLAKE2b-256 53cc2e093b2011f6286c809a6364c05aeecda92aec1250416c4132126574a0aa

See more details on using hashes here.

Supported by

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