We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm trying to get a Processing Sketch (with P3D) running on the Raspberry Pi. Processing seems to run ok, but sketches using P3D give me an empty/transparent Processing screen and:
Listening for transport dt_socket at address: 8638 glGetError 0x500 glGetError 0x500 java.lang.ClassCastException: javax.media.nativewindow.DefaultGraphicsConfiguration cannot be cast to com.jogamp.nativewindow.awt.AWTGraphicsConfiguration at javax.media.opengl.awt.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:1421) at javax.media.opengl.awt.GLCanvas.addNotify(GLCanvas.java:630) at java.awt.Container.addImpl(Container.java:1114) at java.awt.Container.add(Container.java:966) at processing.opengl.PJOGL.initSurface(PJOGL.java:326) at processing.opengl.PGraphicsOpenGL.initPrimary(PGraphicsOpenGL.java:5988) at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1600) at processing.core.PApplet.run(PApplet.java:2177) at java.lang.Thread.run(Thread.java:724)
Quite a bit of research suggests that this is due to the Pi's inability to handle AWT, requiring that I need to build Processing from source and force it to draw to NEWT. So I'm working towards this solution from Xerxes Ranby.. Possibly with codeanticode's .glw library.
I should mention that I am not an experienced programmer, so building from source is somewhat unchartered territory for me so have been following these instructions.
But when I do:
cd build ant run
I get the following:
/home/ben/processing ben@ben-Ideapad-Z570:~/processing$ cd build ben@ben-Ideapad-Z570:~/processing/build$ ant run Buildfile: /home/ben/processing/build/build.xml run: revision-check: linux-checkos: subprojects-build: compile: [methods] No changes to PApplet API. [mkdir] Created dir: /home/ben/processing/core/bin [javac] Compiling 45 source files to /home/ben/processing/core/bin [copy] Copying 1 file to /home/ben/processing/core/bin/japplemenubar [copy] Copying 15 files to /home/ben/processing/core/bin build: [jar] Building jar: /home/ben/processing/core/library/core.jar [mkdir] Created dir: /home/ben/processing/app/generated/processing/mode/java/preproc preproc: [antlr] ANTLR Parser Generator Version 2.7.7 (2006-11-01) 1989-2005 [antlr] /home/ben/processing/app/src/processing/mode/java/preproc/java15.g:941: warning:Syntactic predicate superfluous for single alternative [antlr] /home/ben/processing/app/src/processing/mode/java/preproc/java15.g:1397: warning:empty alternative makes no sense in (...)* or (...)+ [antlr] ANTLR Parser Generator Version 2.7.7 (2006-11-01) 1989-2005 [antlr] /home/ben/processing/app/generated/processing/mode/java/preproc/expandedpde.g:1154: warning:empty alternative makes no sense in (...)* or (...)+ [antlr] /home/ben/processing/app/generated/processing/mode/java/preproc/expandedpde.g:803: warning:Syntactic predicate superfluous for single alternative compile: [mkdir] Created dir: /home/ben/processing/app/bin [javac] Compiling 101 source files to /home/ben/processing/app/bin [javac] ---------- [javac] 1. ERROR in /home/ben/processing/app/src/processing/app/Base.java (at line 998) [javac] final List<Mode> possibleModes = new ArrayList<>(); [javac] ^ [javac] Syntax error on token "<", ? expected after this token [javac] ---------- [javac] 1 problem (1 error) BUILD FAILED /home/ben/processing/build/build.xml:201: The following error occurred while executing this line: /home/ben/processing/build/build.xml:236: The following error occurred while executing this line: /home/ben/processing/app/build.xml:97: Compile failed; see the compiler error output for details.
As I've said, I'm a bit out of my depth here, and have been on this for 3 days, so any help is greatly appreciated.
Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz; Ubuntu 13.10
Edit: To clarify - I haven't actually altered any code in the Processing build yet. At this stage I'm just trying to understand the build process before looking at how I go about forcing NEWT to port to the Raspberry Pi.