Sketch doesn't run on linux

Hi!

I recently installed processing version 3.5.4-6 on my laptop which has a linux manjaro OS.

First I couldn’t open the program at all, but I figured out that I needed to change the Java environment to java-8-openjdk/jre. Now the program opens, but when I try to run the code I get a bunch of errors that I don’t know how to solve.

example:

void setup(){
 size(300,300); 
}

void draw(){
  rect(100,100,50,50); 
}

Gives this of list of errors.

Exception in thread "Thread-184" java.lang.RuntimeException: Exception while attempting /usr/lib/jvm/java-8-openjdk/bin/java -agentlib:jdwp=transport=dt_socket,address=8829,server=y,suspend=y,quiet=y -Djna.nosys=true -Djava.ext.dirs=/usr/lib/jvm/java-8-openjdk/lib/ext -Djava.library.path=:/usr/share/processing/core/library:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib -cp /tmp/sketch_220217a7759906936969567227temp:/usr/share/processing/core/library/core.jar:/usr/share/processing/core/library/jogl-all-natives-linux-armv6hf.jar:/usr/share/processing/core/library/gluegen-rt-natives-linux-amd64.jar:/usr/share/processing/core/library/gluegen-rt.jar:/usr/share/processing/core/library/gluegen-rt-natives-windows-amd64.jar:/usr/share/processing/core/library/jogl-all-natives-linux-aarch64.jar:/usr/share/processing/core/library/gluegen-rt-natives-linux-aarch64.jar:/usr/share/processing/core/library/jogl-all-natives-macosx-universal.jar:/usr/share/processing/core/library/jogl-all.jar:/usr/share/processing/core/library/gluegen-rt-natives-windows-i586.jar:/usr/share/processing/core/library/jogl-all-natives-windows-amd64.jar:/usr/share/processing/core/library/jogl-all-natives-windows-i586.jar:/usr/share/processing/core/library/gluegen-rt-natives-macosx-universal.jar:/usr/share/processing/core/library/gluegen-rt-natives-linux-i586.jar:/usr/share/processing/core/library/jogl-all-natives-linux-amd64.jar:/usr/share/processing/core/library/jogl-all-natives-linux-i586.jar:/usr/share/processing/core/library/gluegen-rt-natives-linux-armv6hf.jar:/usr/lib/jvm/java-8-openjdk/jre/lib/rt.jar:/usr/share/processing/lib/ant.jar:/usr/share/processing/lib/ant-launcher.jar:/usr/share/processing/lib/jna.jar:/usr/share/processing/lib/jna-platform.jar:/usr/share/processing/lib/pde.jar:/usr/share/processing/core/library/core.jar:/usr/share/processing/core/library/gluegen-rt.jar:/usr/share/processing/core/library/gluegen-rt-natives-linux-aarch64.jar:/usr/share/processing/core/library/gluegen-rt-natives-linux-amd64.jar:/usr/share/processing/core/library/gluegen-rt-natives-linux-armv6hf.jar:/usr/share/processing/core/library/gluegen-rt-natives-linux-i586.jar:/usr/share/processing/core/library/gluegen-rt-natives-macosx-universal.jar:/usr/share/processing/core/library/gluegen-rt-natives-windows-amd64.jar:/usr/share/processing/core/library/gluegen-rt-natives-windows-i586.jar:/usr/share/processing/core/library/jogl-all.jar:/usr/share/processing/core/library/jogl-all-natives-linux-aarch64.jar:/usr/share/processing/core/library/jogl-all-natives-linux-amd64.jar:/usr/share/processing/core/library/jogl-all-natives-linux-armv6hf.jar:/usr/share/processing/core/library/jogl-all-natives-linux-i586.jar:/usr/share/processing/core/library/jogl-all-natives-macosx-universal.jar:/usr/share/processing/core/library/jogl-all-natives-windows-amd64.jar:/usr/share/processing/core/library/jogl-all-natives-windows-i586.jar:/usr/share/processing/modes/java/mode/antlr.jar:/usr/share/processing/modes/java/mode/classpath-explorer-1.0.jar:/usr/share/processing/modes/java/mode/com.ibm.icu.jar:/usr/share/processing/modes/java/mode/JavaMode.jar:/usr/share/processing/modes/java/mode/jdi.jar:/usr/share/processing/modes/java/mode/jdimodel.jar:/usr/share/processing/modes/java/mode/jdtCompilerAdapter.jar:/usr/share/processing/modes/java/mode/jsoup-1.7.1.jar:/usr/share/processing/modes/java/mode/org.eclipse.core.contenttype.jar:/usr/share/processing/modes/java/mode/org.eclipse.core.jobs.jar:/usr/share/processing/modes/java/mode/org.eclipse.core.resources.jar:/usr/share/processing/modes/java/mode/org.eclipse.core.runtime.jar:/usr/share/processing/modes/java/mode/org.eclipse.equinox.common.jar:/usr/share/processing/modes/java/mode/org.eclipse.equinox.preferences.jar:/usr/share/processing/modes/java/mode/org.eclipse.jdt.core.jar:/usr/share/processing/modes/java/mode/org.eclipse.osgi.jar:/usr/share/processing/modes/java/mode/org.eclipse.text.jar:/usr/share/processing/modes/java/mode/org.netbeans.swing.outline.jar -ea processing.core.PApplet --display=1 --sketch-path=/tmp/untitled650043097532966200sketches/sketch_220217a sketch_220217a
	at processing.core.PApplet.exec(PApplet.java:3570)
	at processing.mode.java.runner.Runner$1.run(Runner.java:498)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Cannot run program "/usr/lib/jvm/java-8-openjdk/bin/java": error=2, No such file or directory
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at java.lang.Runtime.exec(Runtime.java:621)
	at java.lang.Runtime.exec(Runtime.java:486)
	at processing.core.PApplet.exec(PApplet.java:3568)
	... 2 more
Caused by: java.io.IOException: error=2, No such file or directory
	at java.lang.UNIXProcess.forkAndExec(Native Method)
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
	at java.lang.ProcessImpl.start(ProcessImpl.java:134)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
	... 5 more

Any ideas what could be the problem?

-Pietari

I read error so that java was not found. I run processing on a Ubuntu laptop and installation has always been a breeze. After downloading and extracting files I just ran install.sh installation script and all just worked fine. Processing comes with compatible java, so the should be no need to change jre or set environment.

1 Like