Skip to main content

DEPRECATION WARNING

This fork was the only Python 3-compatible version of JPype for a while, but it has since stalled and its root project, jpype-project/jpype has since added a lot feature, including said support of Py3.

Issue #28 has shown that the differences between the two forks are mainly on implementation and distribution level.

As a result, this fork is now deprecated and should not be used anymore. Version 0.5.5.4 will be the last published version of this repository, and only adds deprecation warning at installation and import time.

This project will stay archived on GitHub, and won’t evolve anymore.

JPype - Python 3

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.

Once this integration is achieved, a second phase will be started to separate the Java logic from the Python logic, eventually allowing the bridging technology to be used in other environments, I.E. Ruby, Perl, COM, etc …

This GitHub fork is a Python 3 version of jPype. It does not support Python 2.

This is a fork of originell/jpype, which originally aims to simplify the installation of jPype on Linux and MacOS X.

Known Bugs/Limitations

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

  • Fields or methods conflicting with a python keyword can’t be accessed.

  • 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.

Road map

Future developments of this fork of jPype :

  • Stay close to the Python 2 version (patches, issues, …)

  • Convert examples in Python 3

  • Review the code (Python and C++): clean up, add comments, …

  • Separate Python 3 specific code (Python and C++)

Requirements

The Python 3 development files and either the Sun/Oracle JDK/JRE Variant or OpenJDK.

Debian/Ubuntu

Debian/Ubuntu users will have to install g++ and python3-dev first:

sudo apt-get install g++ python3-dev

Red Hat/Fedora

Same thing with Fedora users:

su -c 'yum install gcc-c++ python3-devel'

Windows

On Windows, you will have to install:

Installation

On Linux:

sudo python3 setup.py install

On Windows:

python setup.py install

If it fails…

This happens mostly due to the setup not being able to find your JAVA_HOME. In case this happens, please do two things:

  1. You can continue the installation by finding the JAVA_HOME on your own ( the place where the headers etc. are) and explicitly setting it for the installation:

    JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64 python3 setup.py install
  2. Please create an Issue on GitHub and post all the information you have.

Tested on

OS

Architecture

Java version

Fedora 18

64 bits

OpenJDK 6 and 7

Fedora 19

64 bits

OpenJDK 6 and 7

Ubuntu 12.04

64 bits

OpenJDK 6 and 7

Mac OS X 10.8.4

64 bits

Oracle JDK 6 and 7

Mac OS X 10.9

64 bits

Oracle JDK 6 and 7

Windows 7

32 bits

Oracle JDK 7 and OpenJDK 7

Metadata

Release files for JPype1-py3 0.5.5.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for JPype1-py3 0.5.5.4
File Size Uploaded
JPype1-py3-0.5.5.4.tar.gz 88.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for JPype1-py3 0.5.5.4
File Interpreter ABI Platform
JPype1_py3-0.5.5.4-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details

Total release size: 292.8 kB

Release files / JPype1-py3-0.5.5.4.tar.gz

Download URL JPype1-py3-0.5.5.4.tar.gz
Size 88.4 kB
Tags Source
SHA-256 checksum
How to use checksums
445ebb5e2911468b63e67e85def1279461cd8a9def9854e22226f341c6bcf8b0
BLAKE2b-256 checksum
How to use checksums
9b8163f5e4202c598f362ee4684b41890f993d6e58309c5d90703f570ab85f62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.7.2

Release files / JPype1_py3-0.5.5.4-cp37-cp37m-win_amd64.whl

Download URL JPype1_py3-0.5.5.4-cp37-cp37m-win_amd64.whl
Size 204.4 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
41054a5b95cb80f2f0e1b7d2a23e1296aa47e3aaa8c228197b2fa1623e555865
BLAKE2b-256 checksum
How to use checksums
67a0136c612232dd4bd5ec8ce6a9f76dfc2b039514b385935bf3e9c67333ac62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.7.2

Release history Release notifications | RSS feed

This release

0.5.5.4 This release

2 release files

0.5.5

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page