# PiCrate on RaspbianOS and ManjaroARM

**URL:** <https://discourse.processing.org/t/picrate-on-raspbianos-and-manjaroarm/32908>\
**Category:** Processing for Pi\
**Created:** [October 18, 2021, 2:43pm UTC](https://discourse.processing.org/t/picrate-on-raspbianos-and-manjaroarm/32908 "2021-10-18T14:43:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![monkstone](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/monkstone/32/64_2.png) [@monkstone](https://discourse.processing.org/u/monkstone)\
**Post date:** [October 18, 2021, 2:43pm UTC](https://discourse.processing.org/t/picrate-on-raspbianos-and-manjaroarm/32908/1 "2021-10-18T14:43:11Z")

</div>

Contrary to my expectations OpenJDK17 is available for arm32 (from [adoptium.net](http://adoptium.net)). I installed it in the /opt folder on my RaspberryPI4 (RaspbianOS), and created symbolic links using the debian update-alternatives tool:-

```bash
sudo update-alternatives --install /usr/bin/java java /opt/jdk-17+35/bin/java 100

```

And set it to be default java:-

```bash
sudo update-alternatives --config java

```

However when I tried to run more than a basic PiCrate sketch it hung. Now it turns out there was an issue with the clever clogs at Raspbian setting `JAVA_HOME`. For an immediate fix I just set `JAVA_HOME` on the command line.

```bash
export JAVA_HOME=/opt/jdk-17+35

```

Then sketches ran as anticipated, you will not find this issue with `ManjaroARM` since jdk-17 is installed by default.

```bash
sudo pacman -S jre-openjdk

```

Currently PiCrate works on jdk11 and jdk17, but I will be tempted to upgrade to jdk17 in the relatively near future. Since jdk14 there have been interesting [developments](https://monkstone.github.io/jruby_art/update/2021/10/16/PatternInstanceOf.html) in `Pattern match instanceof` and `Switch expression` that can be used by PiCrate. I investigated `JAVA_HOME` issue a bit further and it turns out it gets set dynamically (_see /etc/profile.d/jdk\_home.sh_) so its nothing worry about in practice as it gets updated when you re-login (it might be an issue for vanilla processing with its built in jdk?).
