# Processing does not run code, Java related issues for Arch-Linux based operating system

**URL:** https://discourse.processing.org/t/processing-does-not-run-code-java-related-issues-for-arch-linux-based-operating-system/22860
**Category:** Processing
**Created:** [July 27, 2020, 5:16am UTC](https://discourse.processing.org/t/processing-does-not-run-code-java-related-issues-for-arch-linux-based-operating-system/22860 "2020-07-27T05:16:42Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![anon76195010](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@anon76195010](https://discourse.processing.org/u/anon76195010)
#### Post date: [July 27, 2020, 5:16am UTC](https://discourse.processing.org/t/processing-does-not-run-code-java-related-issues-for-arch-linux-based-operating-system/22860/1 "2020-07-27T05:16:42Z")

</div>

```auto
// Declaring the sound Library
import ddf.minim.*;

// Declearing global class variables
Minim minim;
AudioPlayer audio;

void setup()
{
  minim = new Minim(this);
  audio = minim.loadFile("audio.mp3");
  
  size(800, 800);
  audio.play(); 
}

void draw()
{
  ellipse(400, 400, audio.left.get(1)*800, 400);
}

```

This is my code and I am getting some errors.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/6/6aad042bdfc94674a785997875ca1da19fccd863.png)

(sorry couldn’t copy this to clipboard note this is not the full error message).

Do I need to setup Java or something?

---

<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: [July 27, 2020, 12:47pm UTC](https://discourse.processing.org/t/processing-does-not-run-code-java-related-issues-for-arch-linux-based-operating-system/22860/2 "2020-07-27T12:47:40Z")

</div>

Depends how you installed processing, if you used [package from archlinux](https://aur.archlinux.org/packages/processing/) you will see there is dependency on java-8 runtime. I would recommend adoptopen-jdk, because the default jdk with archlinux (or debian for that matter) have linkage issues with Opengl sketches. If you installed direct from processing it includes a built in jre.

---

<div class="post-metadata">

### Author: ![anon76195010](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@anon76195010](https://discourse.processing.org/u/anon76195010)
#### Post date: [July 27, 2020, 1:17pm UTC](https://discourse.processing.org/t/processing-does-not-run-code-java-related-issues-for-arch-linux-based-operating-system/22860/3 "2020-07-27T13:17:03Z")

</div>

> [@monkstone](#):
>
> I would recommend adoptopen-jdk

Oh sorry mate what do you mean by that? Do you mean install this particular package?

---

<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: [July 27, 2020, 1:35pm UTC](https://discourse.processing.org/t/processing-does-not-run-code-java-related-issues-for-arch-linux-based-operating-system/22860/4 "2020-07-27T13:35:58Z")

</div>

You can do a manual install from the [https://adoptopenjdk.net](https://adoptopenjdk.net) seemingly the archlinux package is flagged out of date.

---

<div class="post-metadata">

### Author: ![hamoid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hamoid/32/58_2.png) [@hamoid](https://discourse.processing.org/u/hamoid)
#### Post date: [July 27, 2020, 2:45pm UTC](https://discourse.processing.org/t/processing-does-not-run-code-java-related-issues-for-arch-linux-based-operating-system/22860/5 "2020-07-27T14:45:24Z")

</div>

I’d swear I was running the Processing package for Archlinux, but now the only package I see in the standard repository is this one (with only the examples):

[https://www.archlinux.org/packages/community/any/processing-examples/](https://www.archlinux.org/packages/community/any/processing-examples/)

In AUR I see several others:

- [https://aur.archlinux.org/packages/processing/](https://aur.archlinux.org/packages/processing/) (3.5.4-2, 7 votes)
- [https://aur.archlinux.org/packages/processing-bin/](https://aur.archlinux.org/packages/processing-bin/) (3.5.4-4, 0 votes)
- [https://aur.archlinux.org/packages/processing-jdk8/](https://aur.archlinux.org/packages/processing-jdk8/) (3.5.4-3, 0 votes)
- [https://aur.archlinux.org/packages/processing4/](https://aur.archlinux.org/packages/processing4/) (4.0a1-1, 0 votes)
- [https://aur.archlinux.org/packages/processing4-git/](https://aur.archlinux.org/packages/processing4-git/) (v4 from git, 0 votes)

The first one is the only one with a discussion around it, which may be useful.

One can also download processing directly from the [processing.org](http://processing.org) website ignoring all these packages.

With this command you can see which Java is the default in your system and change it if needed:

```
archlinux-java status

```

I’m not sure if the default matters, or if Processing uses its own Java, even in Arch Linux?

---

<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: [July 27, 2020, 3:24pm UTC](https://discourse.processing.org/t/processing-does-not-run-code-java-related-issues-for-arch-linux-based-operating-system/22860/6 "2020-07-27T15:24:12Z")

</div>

@hamoid in my experience the default java (as managed by archlinux-java) does not work with [opengl sketches](https://discourse.processing.org/t/choice-of-openjdk-is-critical/16141/7). I find I need to unset java to use the alternatives available at [https://adoptopenjdk.net/](https://adoptopenjdk.net/). I have found both OpenJ9 or hotspot versions to work OK.

---

<div class="post-metadata">

### Author: ![hamoid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hamoid/32/58_2.png) [@hamoid](https://discourse.processing.org/u/hamoid)
#### Post date: [July 27, 2020, 3:31pm UTC](https://discourse.processing.org/t/processing-does-not-run-code-java-related-issues-for-arch-linux-based-operating-system/22860/7 "2020-07-27T15:31:37Z")

</div>

Thank you, I don’t really remember how I set it up. This is what I see in the terminal:

```auto
$ archlinux-java status
Available Java environments:
  java-10-openjdk
  java-11-openjdk
  java-14-openjdk (default)
  java-8-openjdk
$ which processing
/usr/bin/processing
$ ls /usr/lib/jvm/
default@ java-10-openjdk/ java-14-openjdk/
default-runtime@ java-11-openjdk/ java-8-openjdk/

```

and P2D/P3D/shaders do work fine. Do you remember if there used to be a standard processing package for Arch last year? How to know which java it is using?

---

<div class="post-metadata">

### Author: ![hamoid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hamoid/32/58_2.png) [@hamoid](https://discourse.processing.org/u/hamoid)
#### Post date: [July 27, 2020, 3:36pm UTC](https://discourse.processing.org/t/processing-does-not-run-code-java-related-issues-for-arch-linux-based-operating-system/22860/8 "2020-07-27T15:36:24Z")

</div>

Ah so I’m not going crazy after all:

> This package was moved from community to AUR after I reported a bug that is probably related to processing being compiled with OpenJDK instead of Oracle’s Java.

There are 3 pages of [comments](https://aur.archlinux.org/packages/processing/?O=10&PP=10) discussing the package.

---

<div class="post-metadata">

### Author: ![anon76195010](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@anon76195010](https://discourse.processing.org/u/anon76195010)
#### Post date: [July 28, 2020, 4:29am UTC](https://discourse.processing.org/t/processing-does-not-run-code-java-related-issues-for-arch-linux-based-operating-system/22860/9 "2020-07-28T04:29:17Z")

</div>

> [@monkstone](#):
>
> You can do a manual install from the [https://adoptopenjdk.net](https://adoptopenjdk.net) seemingly the archlinux package is flagged out of date.

I manually downloaded the latest one using the hotspot JVM. I extracted it, so what do I do now?

---

<div class="post-metadata">

### Author: ![anon76195010](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@anon76195010](https://discourse.processing.org/u/anon76195010)
#### Post date: [July 28, 2020, 4:30am UTC](https://discourse.processing.org/t/processing-does-not-run-code-java-related-issues-for-arch-linux-based-operating-system/22860/10 "2020-07-28T04:30:08Z")

</div>

The command for me shows this:

```auto
  java-14-openjdk
  java-8-openjdk/jre (default)

```

---

<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: [July 28, 2020, 8:32am UTC](https://discourse.processing.org/t/processing-does-not-run-code-java-related-issues-for-arch-linux-based-operating-system/22860/11 "2020-07-28T08:32:23Z")

</div>

What I normally do is to extract jdk in /opt then create symbolic links to /usr/bin/java etc. Are you sure Archlinux is the right distro for you? it sometimes requires a bit of manual intervention…

---

<div class="post-metadata">

### Author: ![anon76195010](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@anon76195010](https://discourse.processing.org/u/anon76195010)
#### Post date: [July 28, 2020, 9:44am UTC](https://discourse.processing.org/t/processing-does-not-run-code-java-related-issues-for-arch-linux-based-operating-system/22860/12 "2020-07-28T09:44:49Z")

</div>

> [@monkstone](#):
>
> What I normally do is to extract jdk in /opt then create symbolic links to /usr/bin/java etc

I extracted the folder to `/opt`. That is done. I know how to create symbolic links but inside `/usr/bin` `java` already exists, so am I supposed to overwrite it by replacing `java` with a symbolic that will point to `/opt/jdk-14.0.2+12`?

> [@monkstone](#):
>
> Are you sure Archlinux is the right distro for you? it sometimes requires a bit of manual intervention…

Well I am using an Arch-based distro which has an easy GUI installer (calamares). Plus using something that is Debian based is actually harder since `apt` is a much harder and more confusing package manager to use. At least `pacman` and `yay` are much more simple, I don’t need to worry about `ppa`s and stuff.

---

<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: [July 28, 2020, 7:14pm UTC](https://discourse.processing.org/t/processing-does-not-run-code-java-related-issues-for-arch-linux-based-operating-system/22860/13 "2020-07-28T19:14:41Z")

</div>

I’ve run a lot of different linux systems and I have found debian systems to be very stable and quite easy to use, I do like Archlinux though and recently tried Manjaro on my RaspberryPI. However there are some well thought out features on debian such as `update-alternatives`, which is excellent for managing alternative versions of java (and anything else). `Archlinux-java` is new by by comparison and assumes you want to use an Arch installed jdk (also only works for java), if anything it makes installing an alternative jdk more difficult. My preferred debian is linux Mint, and I can see why people get put off by Ubuntu.

---

<div class="post-metadata">

### Author: ![anon76195010](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@anon76195010](https://discourse.processing.org/u/anon76195010)
#### Post date: [July 29, 2020, 1:30am UTC](https://discourse.processing.org/t/processing-does-not-run-code-java-related-issues-for-arch-linux-based-operating-system/22860/14 "2020-07-29T01:30:29Z")

</div>

> [@monkstone](#):
>
> I’ve run a lot of different linux systems and I have found debian systems to be very stable and quite easy to use

yes that is very true I have to admit that.

> [@monkstone](#):
>
> I do like Archlinux though and recently tried Manjaro on my RaspberryPI.

You should try EndeavourOS. I find that Manjaro Openbox edition takes up more RAM compared to EndeavourOS running KDE. Manjaro is kinda bloated in terms of memory usage.

> [@monkstone](#):
>
> However there are some well thought out features on debian such as `update-alternatives` , which is excellent for managing alternative versions of java (and anything else).

Wish that could be part of Arch.

> [@monkstone](#):
>
> `Archlinux-java` is new by by comparison and assumes you want to use an Arch installed jdk (also only works for java), if anything it makes installing an alternative jdk more difficult.

Yeah unfortunately, it kinda makes Arch a bad distro when it comes to programming.

> [@monkstone](#):
>
> My preferred debian is linux Mint, and I can see why people get put off by Ubuntu.

Linux Mint is pretty nice I have to admit. But it takes up far too much memory.

* * *

One question mate, I know how to create symbolic links but inside `/usr/bin`, `java` already exists, so am I supposed to overwrite it by replacing `java` with a symbolic that will point to `/opt/jdk-14.0.2+12`? If so then inside the `jdk-14.0.2+12` what should it specifically point to?

---

<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: [July 29, 2020, 7:26am UTC](https://discourse.processing.org/t/processing-does-not-run-code-java-related-issues-for-arch-linux-based-operating-system/22860/15 "2020-07-29T07:26:19Z")

</div>

I use only ManjaroARM ie 64 bit OS on RaspberryPI (ARM64), Endeavour is x86\_64 ie not usable. I’m hardcore ArchLinux otherwise (which is not for everybody), I wouldn’t get obsessed about using lightweight distro its generally the choice of desktop that makes any real difference. If you do archlinux-java unset, probably removes /usr/bin/java etc, deleting symbolic links is easy enough.

---

<div class="post-metadata">

### Author: ![anon76195010](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@anon76195010](https://discourse.processing.org/u/anon76195010)
#### Post date: [July 29, 2020, 7:31am UTC](https://discourse.processing.org/t/processing-does-not-run-code-java-related-issues-for-arch-linux-based-operating-system/22860/16 "2020-07-29T07:31:42Z")

</div>

> [@monkstone](#):
>
> I use only ManjaroARM ie 64 bit OS on RaspberryPI (ARM64), Endeavour is x86\_64 ie not usable. I’m hardcore ArchLinux otherwise (which is not for everybody),

AH I see.

> [@monkstone](#):
>
> If you do archlinux-java unset, probably removes /usr/bin/java etc, deleting symbolic links is easy enough.

I did that.

Inside this directory `jdk-14.0.2+12`, there are many folders/files  
`bin/ conf/ include/ jmods/ legal/ lib/ man/ release`

Which specific file am I supposed to create a symbolic link to?

---

<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: [July 29, 2020, 5:27pm UTC](https://discourse.processing.org/t/processing-does-not-run-code-java-related-issues-for-arch-linux-based-operating-system/22860/17 "2020-07-29T17:27:27Z")

</div>

Assuming you installed processing using this [PKGBUILD](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=processing) for processing-3.5.4 then from the install script

```bash
ln -s /usr/lib/jvm/java-8-openjdk/ "$pkgdir/usr/share/processing/java"

```

you need to change `/usr/lib/jvm/java-8-openjdk` to wherever you unzipped the `adopt-openjdk` ie you only need to symbolically link the directory to `/usr/share/processing/java`. I hope that works for you because I’m not keen to offer further support.
