Unable to build for mac M1 (Apple Sillicon)

Hello, I have tried using many different Processing 4.0bx versions (4.0b5, 4.0b6, 4.0b8) with different results, but I cannot get any of my builds to open with a Macbook Pro 2021 with the M1 chip.

On windows or older macs, my build runs fine. But on a newer mac I either get a blank grey screen or i get “Unable to Load Java Runtime Environment”.

I have also tried building on the older mac and transfering the file to the newer one, but it doesn´t work. It says the file is damaged.

Is there any way I can solve this? I need to deliver a project and it needs to run on Mac. Thanks!

Relevant thread here: