Mixing Python and Java How Python and Java can communicate  and work together EuroPython 2009 (June 30th 2009, Birmingham) Andreas Schreiber  <Andreas.Schreiber@dlr.de> German Aerospace Center (DLR), Cologne, Germany http://www.dlr.de/sc
Final Version of this Slides is  available on SlideShare http://tr.im/ep09java
Summary Java is being used for many existing applications in a variety of domains. Sometimes it is useful to integrate them with Python. For instance, one may wish to add embedded Python scripting to Java applications, to communicate with separate Python code written for CPython, or use existing Java libraries from Python code. The talk gives an overview of the various techniques, tools, and libraries for bridging Python and Java. In particular, the following implementations are described and compared: * Embedding of Python into Java with Jython. * Calling Java code from CPython scripts with JPype. * Calling CPython from Java code with JEPP. * Using inter process communication between Python and Java (e.g., with CORBA or SPIRO). Examples for all techniques are demonstrated, and use cases for the different approaches are presented with examples from real world applications.
Jython Java Virtual Machine Jython Python  Code Java Application Code
JEPP Python Interpreter Java Virtual Machine Java Application  Code Python  Code JNI JEPP
JPype Python Interpreter JNI JPype Python  Application Code Java Virtual Machine Java Application Code
JCC Python Interpreter JNI Python Code Java Virtual Machine Java Application Code pythonExtension() Generated C++ Wrapper Code JCC Code Generator
ORBs Java Virtual Machine Generated Java Code ( Stub ) Python Interpreter ORB Python  Application Code ( Server ) Generated  Python Code ( Skeleton ) Java Application Code ( Client ) IDL Compiler IDL
Web Services: SOAP Java Virtual Machine Servlet Container Java Application Code ( Server ) Python Interpreter Generated  Python Code ( Stub ) Python  Application Code ( Client ) Generated Java Code ( Skeleton ) WSDL Compiler WSDL
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java
Mixing Python and Java

More Related Content

PDF
リクルートのWebサービスを支える「RAFTEL」
PDF
大企業Hacks!
PDF
MySQLと組み合わせて始める全文検索プロダクト"elasticsearch"
PDF
【Oracle Cloud ウェビナー】WebLogic Serverのご紹介
PPTX
コードレビュー改善のためにJenkinsとIntelliJ IDEAのプラグインを自作してみた話
PPTX
クラウドネイティブ時代の大規模ウォーターフォール開発(CloudNative Days Tokyo 2021 発表資料)
PDF
Spring Boot × Vue.jsでSPAを作る
PDF
モバイルオンラインゲームについて
リクルートのWebサービスを支える「RAFTEL」
大企業Hacks!
MySQLと組み合わせて始める全文検索プロダクト"elasticsearch"
【Oracle Cloud ウェビナー】WebLogic Serverのご紹介
コードレビュー改善のためにJenkinsとIntelliJ IDEAのプラグインを自作してみた話
クラウドネイティブ時代の大規模ウォーターフォール開発(CloudNative Days Tokyo 2021 発表資料)
Spring Boot × Vue.jsでSPAを作る
モバイルオンラインゲームについて

What's hot (20)

PDF
Mavenの真実とウソ
PPTX
5分で出来る!イケてるconfluenceページ
PPTX
PrometheusによるKubernetes環境の異常検知改善.pptx
PDF
FPGAによる大規模データ処理の高速化
PDF
Apache EventMesh を使ってみた
PDF
AWS CAF & Well-Architected Framework
PDF
新人研修資料 向き合うエンジニア
ODP
Guide To AGPL
PDF
Fargate起動歴1日の男が語る運用の勘どころ
PDF
Xamarin.forms入門
PDF
【BS13】チーム開発がこんなにも快適に!コーディングもデバッグも GitHub 上で。 GitHub Codespaces で叶えられるシームレスな開発
PPTX
モノリスからマイクロサービスへの移行 ~ストラングラーパターンの検証~(Spring Fest 2020講演資料)
PDF
ジャストシステムJava100本ノックのご紹介
PDF
Developers Summit 2023 9-D-1「もう悩まされない開発環境、プロジェクトで統一した環境をいつでもどこでも」
PDF
リクルートのWebサービスを支える共通インフラ「RAFTEL」
PPTX
V$SQLとその周辺でER図を描いてみよう!
PDF
最速・最短・最簡単でKubernetesを始めるハウツー with k0s
PDF
AWSで透過プロキシをやってみた
PDF
PDF
マイクロサービス化デザインパターン - #AWSDevDay Tokyo 2018
Mavenの真実とウソ
5分で出来る!イケてるconfluenceページ
PrometheusによるKubernetes環境の異常検知改善.pptx
FPGAによる大規模データ処理の高速化
Apache EventMesh を使ってみた
AWS CAF & Well-Architected Framework
新人研修資料 向き合うエンジニア
Guide To AGPL
Fargate起動歴1日の男が語る運用の勘どころ
Xamarin.forms入門
【BS13】チーム開発がこんなにも快適に!コーディングもデバッグも GitHub 上で。 GitHub Codespaces で叶えられるシームレスな開発
モノリスからマイクロサービスへの移行 ~ストラングラーパターンの検証~(Spring Fest 2020講演資料)
ジャストシステムJava100本ノックのご紹介
Developers Summit 2023 9-D-1「もう悩まされない開発環境、プロジェクトで統一した環境をいつでもどこでも」
リクルートのWebサービスを支える共通インフラ「RAFTEL」
V$SQLとその周辺でER図を描いてみよう!
最速・最短・最簡単でKubernetesを始めるハウツー with k0s
AWSで透過プロキシをやってみた
マイクロサービス化デザインパターン - #AWSDevDay Tokyo 2018
Ad

Similar to Mixing Python and Java (20)

PPT
Communication between Java and Python
PDF
Jython 2.7 and techniques for integrating with Java - Frank Wierzbicki
PDF
Jython: Integrating Python and Java
PPTX
Integrating Java with python
PDF
Java: Rumours of my demise are greatly exaggerated
PDF
A Quick Tour of JVM Languages
PPTX
How to integrate python into a scala stack
PPT
WSO2 WSF/Jython
PPTX
python.pptx
PPTX
IPT 2.pptx
PDF
Java vs. Python: A Programming Language Comparison for 2022
PDF
Northwest Python Day 2009
PDF
Jython in workflow and rules engines
PDF
Java ScriptingJava Scripting: One VM, Many Languages
PDF
Ola Bini Evolving The Java Platform
PPTX
Jython for Embedded Software Validation
PDF
Bitter Java, Sweeten with JRuby
ZIP
An Introduction to PyPy
PDF
A Shallow Survey of Alternative Languages on the JVM
Communication between Java and Python
Jython 2.7 and techniques for integrating with Java - Frank Wierzbicki
Jython: Integrating Python and Java
Integrating Java with python
Java: Rumours of my demise are greatly exaggerated
A Quick Tour of JVM Languages
How to integrate python into a scala stack
WSO2 WSF/Jython
python.pptx
IPT 2.pptx
Java vs. Python: A Programming Language Comparison for 2022
Northwest Python Day 2009
Jython in workflow and rules engines
Java ScriptingJava Scripting: One VM, Many Languages
Ola Bini Evolving The Java Platform
Jython for Embedded Software Validation
Bitter Java, Sweeten with JRuby
An Introduction to PyPy
A Shallow Survey of Alternative Languages on the JVM
Ad

More from Andreas Schreiber (20)

PPTX
Provenance-based Security Audits and its Application to COVID-19 Contact Trac...
PPTX
Visualization of Software Architectures in Virtual Reality and Augmented Reality
PPTX
Provenance as a building block for an open science infrastructure
PPTX
Raising Awareness about Open Source Licensing at the German Aerospace Center
PDF
Open Source Licensing for Rocket Scientists
PDF
Interactive Visualization of Software Components with Virtual Reality Headsets
PPTX
Provenance for Reproducible Data Science
PPTX
Visualizing Provenance using Comics
PPTX
Quantified Self Comics
PPTX
Nachvollziehbarkeit mit Hinblick auf Privacy-Verletzungen
PPTX
Reproducible Science with Python
PPTX
Python at Warp Speed
PPTX
A Provenance Model for Quantified Self Data
PPTX
Open Source im DLR
PDF
Tracking after Stroke: Doctors, Dogs and All The Rest
PPTX
High Throughput Processing of Space Debris Data
PDF
Bericht von der QS15 Conference & Exposition
PPTX
Telemedizin: Gesundheit, messbar für jedermann
PDF
Big Python
PDF
Quantified Self mit Wearable Devices und Smartphone-Sensoren
Provenance-based Security Audits and its Application to COVID-19 Contact Trac...
Visualization of Software Architectures in Virtual Reality and Augmented Reality
Provenance as a building block for an open science infrastructure
Raising Awareness about Open Source Licensing at the German Aerospace Center
Open Source Licensing for Rocket Scientists
Interactive Visualization of Software Components with Virtual Reality Headsets
Provenance for Reproducible Data Science
Visualizing Provenance using Comics
Quantified Self Comics
Nachvollziehbarkeit mit Hinblick auf Privacy-Verletzungen
Reproducible Science with Python
Python at Warp Speed
A Provenance Model for Quantified Self Data
Open Source im DLR
Tracking after Stroke: Doctors, Dogs and All The Rest
High Throughput Processing of Space Debris Data
Bericht von der QS15 Conference & Exposition
Telemedizin: Gesundheit, messbar für jedermann
Big Python
Quantified Self mit Wearable Devices und Smartphone-Sensoren

Recently uploaded (20)

PDF
CloudStack 4.21: First Look Webinar slides
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PPTX
Microsoft Excel 365/2024 Beginner's training
PDF
Statistics on Ai - sourced from AIPRM.pdf
DOCX
search engine optimization ppt fir known well about this
PDF
Developing a website for English-speaking practice to English as a foreign la...
PPT
Geologic Time for studying geology for geologist
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PPT
What is a Computer? Input Devices /output devices
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PDF
Getting started with AI Agents and Multi-Agent Systems
PPTX
The various Industrial Revolutions .pptx
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
Comparative analysis of machine learning models for fake news detection in so...
DOCX
Basics of Cloud Computing - Cloud Ecosystem
PDF
A proposed approach for plagiarism detection in Myanmar Unicode text
PDF
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
CloudStack 4.21: First Look Webinar slides
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
OpenACC and Open Hackathons Monthly Highlights July 2025
sustainability-14-14877-v2.pddhzftheheeeee
Microsoft Excel 365/2024 Beginner's training
Statistics on Ai - sourced from AIPRM.pdf
search engine optimization ppt fir known well about this
Developing a website for English-speaking practice to English as a foreign la...
Geologic Time for studying geology for geologist
sbt 2.0: go big (Scala Days 2025 edition)
What is a Computer? Input Devices /output devices
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
Getting started with AI Agents and Multi-Agent Systems
The various Industrial Revolutions .pptx
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
Comparative analysis of machine learning models for fake news detection in so...
Basics of Cloud Computing - Cloud Ecosystem
A proposed approach for plagiarism detection in Myanmar Unicode text
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
Taming the Chaos: How to Turn Unstructured Data into Decisions

Mixing Python and Java

  • 1. Mixing Python and Java How Python and Java can communicate and work together EuroPython 2009 (June 30th 2009, Birmingham) Andreas Schreiber <[email protected]> German Aerospace Center (DLR), Cologne, Germany http://www.dlr.de/sc
  • 2. Final Version of this Slides is available on SlideShare http://tr.im/ep09java
  • 3. Summary Java is being used for many existing applications in a variety of domains. Sometimes it is useful to integrate them with Python. For instance, one may wish to add embedded Python scripting to Java applications, to communicate with separate Python code written for CPython, or use existing Java libraries from Python code. The talk gives an overview of the various techniques, tools, and libraries for bridging Python and Java. In particular, the following implementations are described and compared: * Embedding of Python into Java with Jython. * Calling Java code from CPython scripts with JPype. * Calling CPython from Java code with JEPP. * Using inter process communication between Python and Java (e.g., with CORBA or SPIRO). Examples for all techniques are demonstrated, and use cases for the different approaches are presented with examples from real world applications.
  • 4. Jython Java Virtual Machine Jython Python Code Java Application Code
  • 5. JEPP Python Interpreter Java Virtual Machine Java Application Code Python Code JNI JEPP
  • 6. JPype Python Interpreter JNI JPype Python Application Code Java Virtual Machine Java Application Code
  • 7. JCC Python Interpreter JNI Python Code Java Virtual Machine Java Application Code pythonExtension() Generated C++ Wrapper Code JCC Code Generator
  • 8. ORBs Java Virtual Machine Generated Java Code ( Stub ) Python Interpreter ORB Python Application Code ( Server ) Generated Python Code ( Skeleton ) Java Application Code ( Client ) IDL Compiler IDL
  • 9. Web Services: SOAP Java Virtual Machine Servlet Container Java Application Code ( Server ) Python Interpreter Generated Python Code ( Stub ) Python Application Code ( Client ) Generated Java Code ( Skeleton ) WSDL Compiler WSDL

Editor's Notes

  • #3: http://tr.im/ep09twt