I'm using Processing 1.5.1 for Mac OS X El Capitan and when I run some code on my app it displays that message. When I type java -version I get:
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468-11M4833)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-468, mixed mode)
and when I type /usr/libexec/java_home -V I get:
Matching Java Virtual Machines (3):
1.8.0_65, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
1.6.0_65-b14-468, x86_64: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
1.6.0_65-b14-468, i386: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
I've tried setting JAVA_HOME to:
export JAVA_HOME=`/usr/libexec/java_home -v 1.6.0_65-b14-468`
but still when I reopen Processing it still displays the same error. Any help or suggestions to force it to run JVM 32-bit?
Processing 1.5 is pretty old. I wouldn't use it unless you have a very specific reason to do so. And even then, you should probably try to find a workaround.
Instead, you should try to use the latest version of Processing (right now, version 3.1.1) if at all possible. But you're using a library that hasn't upgraded yet, so you have to rely on 2.2.1.
Version 2.2.1 added a bunch of stuff over Processing 1.5, including:
Better 32 and 64-bit support. We now support separate 32- and 64-bit libraries and have added separate 32- and 64-bit versions of the Processing download. On Mac OS X, you can even select which mode you'd like to use.
I don't know if this is exactly what fixed your problem, but I would bet that Processing 2.2.1 added something that fixed the issue.
As soon as your library upgrades to Processing 3, you should upgrade your Processing version.