We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I get this error when trying to run Processing 3.3.3 ARM64 version on Raspberry Pi under OpenSUSE Tumbleweed LxQT.
I turned on logging in the processing
script; here is the full output:
david@raspberrypi:~/processing> ./processing
APPDIR=/home/david/processing
DIR=/home/david/processing/java
L=rt.jar
LIB=/home/david/processing/java/lib/rt.jar
JDKCP=/home/david/processing/java/lib/rt.jar
SUCCESS=1
CLASSPATH=/home/david/processing/java/lib/rt.jar:/home/david/processing/lib/ant.jar:/home/david/processing/lib/ant-launcher.jar:/home/david/processing/lib/jna.jar:/home/david/processing/lib/jna-platform.jar:/home/david/processing/lib/pde.jar:/home/david/processing/core/library/core.jar:/home/david/processing/core/library/gluegen-rt.jar:/home/david/processing/core/library/gluegen-rt-natives-linux-aarch64.jar:/home/david/processing/core/library/gluegen-rt-natives-linux-amd64.jar:/home/david/processing/core/library/gluegen-rt-natives-linux-armv6hf.jar:/home/david/processing/core/library/gluegen-rt-natives-linux-i586.jar:/home/david/processing/core/library/gluegen-rt-natives-macosx-universal.jar:/home/david/processing/core/library/gluegen-rt-natives-windows-amd64.jar:/home/david/processing/core/library/gluegen-rt-natives-windows-i586.jar:/home/david/processing/core/library/jogl-all.jar:/home/david/processing/core/library/jogl-all-natives-linux-aarch64.jar:/home/david/processing/core/library/jogl-all-natives-linux-amd64.jar:/home/david/processing/core/library/jogl-all-natives-linux-armv6hf.jar:/home/david/processing/core/library/jogl-all-natives-linux-i586.jar:/home/david/processing/core/library/jogl-all-natives-macosx-universal.jar:/home/david/processing/core/library/jogl-all-natives-windows-amd64.jar:/home/david/processing/core/library/jogl-all-natives-windows-i586.jar:/home/david/processing/modes/java/mode/antlr.jar:/home/david/processing/modes/java/mode/classpath-explorer-1.0.jar:/home/david/processing/modes/java/mode/com.ibm.icu.jar:/home/david/processing/modes/java/mode/JavaMode.jar:/home/david/processing/modes/java/mode/jdi.jar:/home/david/processing/modes/java/mode/jdimodel.jar:/home/david/processing/modes/java/mode/jdtCompilerAdapter.jar:/home/david/processing/modes/java/mode/jsoup-1.7.1.jar:/home/david/processing/modes/java/mode/org.eclipse.core.contenttype.jar:/home/david/processing/modes/java/mode/org.eclipse.core.jobs.jar:/home/david/processing/modes/java/mode/org.eclipse.core.resources.jar:/home/david/processing/modes/java/mode/org.eclipse.core.runtime.jar:/home/david/processing/modes/java/mode/org.eclipse.equinox.common.jar:/home/david/processing/modes/java/mode/org.eclipse.equinox.preferences.jar:/home/david/processing/modes/java/mode/org.eclipse.jdt.core.jar:/home/david/processing/modes/java/mode/org.eclipse.osgi.jar:/home/david/processing/modes/java/mode/org.eclipse.text.jar:/home/david/processing/modes/java/mode/org.netbeans.swing.outline.jar
PATH=/home/david/processing/java/bin:/home/david/.yarn/bin:/home/david/.yarn/bin:/home/david/bin:/usr/local/bin:/usr/bin:/bin
david@raspberrypi:~/processing> Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
at java.awt.Window.<init>(Window.java:536)
at java.awt.Frame.<init>(Frame.java:420)
at java.awt.Frame.<init>(Frame.java:385)
at processing.app.Messages.showTrace(Messages.java:177)
at processing.app.Base$1.run(Base.java:119)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Answers
Further info: it appears not to be a Processing thing; I get the same error when I run any Java program that wants to do graphics.
it thinks you aren't running a desktop on your pi
what does
echo $DISPLAY
say?It says
:0.0
OpenJDK works fine; it's an Oracle thing, apparently.After looking at the source and doing some testing, the problem is that the version of Java that I am using (downloaded from jdk-8u131-linux-arm64-vfp-hflt.tar.gz) has
java.awt.headless
set totrue
Setting the flag tofalse
on the command line doesn’t help; you then get an error thatlibawt_xawt.so
can’t be loaded. [Later edit:] It would appear that graphics aren’t a part of that particular distribution at all.@jdheisenberg Interesting. Do you have a link to an image file that I could try to run on my Raspberry Pi 3?
And this Tumbleweed is running X, not some Wayland server? You're getting this output when you run it inside an X session?
Just out of curiosity: you could also try executing a sketch from the terminal and see how far you get there. It should be something like
./processing-java --sketch=/home/david/processing/modes/java/examples/Basics/Transform/Rotate --run
.Your example gives an
ExceptionInInitializerError
Consider the following code, which I modified from java.awt.GraphicsEnvironment:
Here is what happens when I run it from OpenJDK and from the java that comes with Processing. A result of
false
means that there is a graphic display; a result oftrue
means there is no graphic display.@jdeisenberg Thanks for confirming this. Were you able to test Processing with the OpenJDK VM? (Replacing the java directory with a symlink should work)
Yes, it works great (of course, it gives the warning about not using OpenJDK).