# Installing Processing on Ubuntu

**URL:** https://discourse.processing.org/t/installing-processing-on-ubuntu/39112
**Category:** Processing
**Created:** [October 5, 2022, 11:54pm UTC](https://discourse.processing.org/t/installing-processing-on-ubuntu/39112 "2022-10-05T23:54:43Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![chrissatch](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrissatch/32/17084_2.png) [@chrissatch](https://discourse.processing.org/u/chrissatch)
#### Post date: [October 5, 2022, 11:54pm UTC](https://discourse.processing.org/t/installing-processing-on-ubuntu/39112/1 "2022-10-05T23:54:44Z")

</div>

I downloaded Processing for Linux and the one for Mac but both came up with error messages when I open the program icon processing

```bash
#!/bin/sh

# This script runs Processing, using the JRE in the Processing
# installation directory.

# If your system needs a different version of Java than what's included
# in the download, replace the 'java' folder with the contents of a new
# OpenJDK (Java 11 only), or create a symlink named "java" in the
# Processing installation directory that points to the JRE home directory.

# Thanks to Ferdinand Kasper for this build script. [fry]

# JARs required from JDK (anywhere in/below the JDK home directory)
JDKLIBS="rt.jar"

# Set this to non-zero for logging
LOGGING=0

# Logs name and value of a variable to stdout if LOGGING is non-zero.
# Expects the variable name as parameter $1.
log() {
  if [$LOGGING -ne 0]; then
    eval echo $1=\$$1
  fi
}

# Locates JDKLIBS in a directory and its subdirectories and saves their
# absolute paths as list to JDKCP. Expects the directory as parameter $1.
# Sets SUCCESS to 1 if all libraries were found, to 0 otherwise.
make_jdkcp() {
  # Back out of JRE directory if apparently located inside a JDK
  if [-f "$1/../bin/java"]; then
    DIR="$1/.."
  else
    DIR="$1"
  fi
  log DIR

  JDKCP=
  SUCCESS=1

  # Locate JDKLIBS
  for L in $JDKLIBS; do
    # Locate only the first library with a matching name
    LIB=`find "$DIR" -name $L 2>/dev/null | head -n 1`
    log L
    log LIB

    # Library found?
    if [-n "$LIB"]; then
      JDKCP="$JDKCP"${JDKCP:+:}"$LIB"
    else
      SUCCESS=0
    fi
  done

  log JDKCP
}

# Get absolute path of directory where this script is located
APPDIR=`readlink -f "$0"`
APPDIR=`dirname "$APPDIR"`
log APPDIR

# Try using a local JDK from the same directory as this script
JDKDIR=`readlink -f "$APPDIR/java"`
make_jdkcp "$JDKDIR"
log SUCCESS

# Don't use the installed JDK, because it's not supported.
# Local JDK found?
#if [$SUCCESS -ne 1]; then
# # No, try using the preferred system JRE/JDK (if any)
# JDKDIR=`which java` && JDKDIR=`readlink -e "$JDKDIR"` && JDKDIR=`dirname "$JDKDIR"`/..
# make_jdkcp "$JDKDIR"
# log SUCCESS
#fi

# Add all required JARs to CLASSPATH
CLASSPATH="$CLASSPATH"${CLASSPATH:+:}"$JDKCP"
for LIB in "$APPDIR"/lib/*.jar; do
  CLASSPATH="$CLASSPATH"${CLASSPATH:+:}"$LIB"
done
for LIB in "$APPDIR"/core/library/*.jar; do
  CLASSPATH="$CLASSPATH"${CLASSPATH:+:}"$LIB"
done
for LIB in "$APPDIR"/modes/java/mode/*.jar; do
  CLASSPATH="$CLASSPATH"${CLASSPATH:+:}"$LIB"
done
export CLASSPATH
log CLASSPATH

# Make all JDK binaries available in PATH
export PATH="$JDKDIR/bin":"$PATH"
log PATH

current_name=`basename $0`
cmd_name='processing-java'

if [$current_name = $cmd_name]
then
    java -Djna.nosys=true -Xmx512m processing.mode.java.Commander "$@"
    exit $?
else
  # Start Processing in the same directory as this script
  cd "$APPDIR"
  java -Djna.nosys=true -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dpython.console.encoding=UTF-8 -Xmx512m --add-opens=java.desktop/sun.awt.X11=ALL-UNNAMED processing.app.ui.Splash "$@" &
fi

```

---

<div class="post-metadata">

### Author: ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)
#### Post date: [October 6, 2022, 7:36am UTC](https://discourse.processing.org/t/installing-processing-on-ubuntu/39112/2 "2022-10-06T07:36:54Z")

</div>

Hi @chrissatch,

Welcome to the forum! 😉

Can you please format the error message with the `</>` button or use backticks around it like this: ```code``` → `code`

It seems that you posted the content of the bash script, is it what you wanted to do?

---

<div class="post-metadata">

### Author: ![chrissatch](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrissatch/32/17084_2.png) [@chrissatch](https://discourse.processing.org/u/chrissatch)
#### Post date: [October 6, 2022, 12:45pm UTC](https://discourse.processing.org/t/installing-processing-on-ubuntu/39112/3 "2022-10-06T12:45:09Z")

</div>

Yes, I am just learning programming I put in the \<\>

But I am taking a college level Processing course, and thought it would be easier to have Ubuntu but then I have been having trouble installing Processing the way it says from the instructions on the website. Is there a way to open it in terminal? Or is there any way that is easier because I don’t know what they mean by symlink and creating a new java folder in the bash script?

---

<div class="post-metadata">

### Author: ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)
#### Post date: [October 6, 2022, 12:57pm UTC](https://discourse.processing.org/t/installing-processing-on-ubuntu/39112/4 "2022-10-06T12:57:52Z")

</div>

> [@chrissatch](#):
>
> Yes, I am just learning programming I put in the \<\>

No problem! (just edit your message 😉 )

> [@chrissatch](#):
>
> and thought it would be easier to have Ubuntu

Yes I am myself running on Linux for everyday tasks and programming and you learn a lot by doing so!

The installation process should be straightforward, just run the .sh script from the command line:

```bash
$ cd processing-4.0.1 # Go into the processing folder
$ sh ./install.sh # Run the install script

```

Then it will install Processing and add a menu shortcut in your applications.

You can also directly run it from the command line with:

```bash
$ ./processing

```

* * *

Notes:

- You can also run the install script without calling the `sh` [shell program](https://en.wikipedia.org/wiki/Bourne_shell) like so: `./install.sh`  
This is possible because the file is executable:

---

<div class="post-metadata">

### Author: ![chrissatch](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrissatch/32/17084_2.png) [@chrissatch](https://discourse.processing.org/u/chrissatch)
#### Post date: [October 6, 2022, 8:33pm UTC](https://discourse.processing.org/t/installing-processing-on-ubuntu/39112/5 "2022-10-06T20:33:12Z")

</div>

I did it in the terminal bu when I ran

\< $ ./processing\>

an error message ran saying:

./processing: 110: java: Exec format error

---

<div class="post-metadata">

### Author: ![chrissatch](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrissatch/32/17084_2.png) [@chrissatch](https://discourse.processing.org/u/chrissatch)
#### Post date: [October 7, 2022, 4:09am UTC](https://discourse.processing.org/t/installing-processing-on-ubuntu/39112/6 "2022-10-07T04:09:07Z")

</div>

Hey josephh,

I got it running!! So happy, I was working on labs for my class in the web editor, but in the regular program I can do so much more with it!!!

---

<div class="post-metadata">

### Author: ![chrissatch](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrissatch/32/17084_2.png) [@chrissatch](https://discourse.processing.org/u/chrissatch)
#### Post date: [October 7, 2022, 4:09am UTC](https://discourse.processing.org/t/installing-processing-on-ubuntu/39112/7 "2022-10-07T04:09:40Z")

</div>

Thank you very much, when I ran it through the terminal it loaded!

---

<div class="post-metadata">

### Author: ![justinlui](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@justinlui](https://discourse.processing.org/u/justinlui)
#### Post date: [August 5, 2023, 12:55am UTC](https://discourse.processing.org/t/installing-processing-on-ubuntu/39112/8 "2023-08-05T00:55:40Z")

</div>

@chrissatch Hi, can you tell me how you solved this problem? I’m also trying to install and run Processing on a Raspberry Pi, and I’m getting the same error message (in Terminal) that you got back in October 2022:  
./processing: 110: java: Exec format error

---

<div class="post-metadata">

### Author: ![justinlui](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@justinlui](https://discourse.processing.org/u/justinlui)
#### Post date: [August 5, 2023, 1:35am UTC](https://discourse.processing.org/t/installing-processing-on-ubuntu/39112/9 "2023-08-05T01:35:40Z")

</div>

@chrissatch Never mind, I was able to solve it by switching from a 64-bit version of Processing to a 32-bit version of Processing.

Which is strange, because my Raspberry Pi 4 Model B says on the box that it’s got a 64-bit processor! But whatever, 32-bit works on this Pi.
