# Has anyone tried Py4J with Processing (Java) app?

**URL:** <https://discourse.processing.org/t/has-anyone-tried-py4j-with-processing-java-app/7218>\
**Category:** Processing\
**Created:** [January 5, 2019, 2:10pm UTC](https://discourse.processing.org/t/has-anyone-tried-py4j-with-processing-java-app/7218 "2019-01-05T14:10:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![HartzaQ](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hartzaq/32/3106_2.png) [@HartzaQ](https://discourse.processing.org/u/HartzaQ)\
**Post date:** [January 5, 2019, 2:10pm UTC](https://discourse.processing.org/t/has-anyone-tried-py4j-with-processing-java-app/7218/1 "2019-01-05T14:10:10Z")

</div>

It seems that it’s be possible to hook Python interpreter with a Java app with Py4J. Based on the example at [Py4j webpage](https://www.py4j.org/), I cannot see why it wouldn’t work with Processing app, but has anyone tried it?

Reason why I’m interested on this is numpy and other data analysis libraries Python has. They cannot be run in processing.py. Especially numpy would be very handy with images.

Harri K

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [January 5, 2019, 3:09pm UTC](https://discourse.processing.org/t/has-anyone-tried-py4j-with-processing-java-app/7218/2 "2019-01-05T15:09:02Z")

</div>

Maybe you may wanna try out some numpy lokalike solution for Java: ☕

- [GitHub.com/search?l=Java&q=numpy&type=Repositories](http://GitHub.com/search?l=Java&q=numpy&type=Repositories)

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [January 24, 2019, 12:01am UTC](https://discourse.processing.org/t/has-anyone-tried-py4j-with-processing-java-app/7218/3 "2019-01-24T00:01:49Z")

</div>

You could look at using Py4J, JPype, or Pyjnius – each has advantages and drawbacks. In any case, you could just use them with the Processing library outside Processing (e.g. in Eclipse for Py4J) – or you would need to develop a Mode. In order to achieve a result that is anything like the native API feel of programming a sketch in processing.py, you will need to do some substantial mapping work, and it is a big API – I don’t think that you can just call Pyjinius “autoclass” and call it a data (although I haven’t tried!).

You might also be interested in pyprocessing, [https://pypi.org/project/pyprocessing/](https://pypi.org/project/pyprocessing/) which is not a mode for PDE, but instead a native Python project. It is similar to the Processing API but doesn’t share its JVM / library ecosystem.

---

<div class="post-metadata">

**Author:** ![HartzaQ](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hartzaq/32/3106_2.png) [@HartzaQ](https://discourse.processing.org/u/HartzaQ)\
**Post date:** [January 25, 2019, 7:38am UTC](https://discourse.processing.org/t/has-anyone-tried-py4j-with-processing-java-app/7218/4 "2019-01-25T07:38:42Z")

</div>

Thanks Jeremy,

pyprocessing even though development has ended ages ago looks interesting. It seems to have functionality I need from processing. I might for this project go all the way with python. Processing gives a nice framework for visuals, but my starting point is a photograph and so far I haven’t much done graphics drawing with processing.

---

<div class="post-metadata">

**Author:** ![solub](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/solub/32/333_2.png) [@solub](https://discourse.processing.org/u/solub)\
**Post date:** [January 31, 2019, 2:14pm UTC](https://discourse.processing.org/t/has-anyone-tried-py4j-with-processing-java-app/7218/5 "2019-01-31T14:14:55Z")

</div>

> [@GoToLoop](#):
>
> Maybe you may wanna try out some numpy lokalike solution for Java: ☕
> 
> - [GitHub.com/search?l=Java&q=numpy&type=Repositories](http://GitHub.com/search?l=Java&q=numpy&type=Repositories)

Hi @GoToLoop

I’m very interested in Java alternatives to numpy, would you mind sharing what’s your favourite solution so far ?

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [January 31, 2019, 2:17pm UTC](https://discourse.processing.org/t/has-anyone-tried-py4j-with-processing-java-app/7218/6 "2019-01-31T14:17:24Z")

</div>

Sorry, never used 1. Just searched for them on GitHub repos. 😞
