Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/allancapistrano/python-within-java
- Owner: AllanCapistrano
- License: mit
- Created: 2024-01-04T13:15:21.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-01-09T13:22:05.000Z (12 months ago)
- Last Synced: 2024-10-14T08:09:47.413Z (2 months ago)
- Language: Java
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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:
 
 
------------
## :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)