Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/allancapistrano/python-within-java

A project that shows how to execute Python code within a Java project.
https://github.com/allancapistrano/python-within-java

Last synced: about 1 month ago
JSON representation

A project that shows how to execute Python code within a Java project.

Awesome Lists containing this project

README

        

Python within Java

## :book: Description ##
This project shows how to execute Python code within a Java project. There are three different ways to do that:
- Using [Apache Commons Exec](https://commons.apache.org/proper/commons-exec/index.html)
- Using [Jython](https://www.jython.org/)
- Using [Process Builder](https://docs.oracle.com/javase/8/docs/api/java/lang/ProcessBuilder.html)

Each has advantages and disadvantages, but Jython does not support Python 3, while the others use Python installed on your local machine.

Apache Commons Exec doesn't work well handling [Pythons lists](https://docs.python.org/3/tutorial/datastructures.html), while Process Builder doesn't work well with [Numpy Array](https://numpy.org/doc/stable/reference/generated/numpy.array.html).

------------

## :man_technologist: Author ##

| [![Allan Capistrano](https://github.com/AllanCapistrano.png?size=100)](https://github.com/AllanCapistrano) |
| -----------------------------------------------------------------------------------------------------------|
| [Allan Capistrano](https://github.com/AllanCapistrano) |


My socials:



Github icon

&nbsp

Linkedin icon

&nbsp

Email icon

------------

## :pray: Support ##

**Please :star: this repository if this project is useful or has helped you.**

[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/allancapistrano)

------------

## :balance_scale: License ##
[MIT License](./LICENSE)