I'm using version 2.0.3 32-bit on Windows 7 Pro 64-bit.
I typically execute sketches from the command-line using processing-java.exe. However, using 2.0.3, I set the following printed to the command window:
Listening for transport dt_socket at address: 8088
The port number will vary.
This is followed by an error:
java.lang.ClassNotFoundException: Files
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
and that's as far as it gets.
Some Googling tells me this port access for attaching a debugger. I'm not deliberately looking to do that, so why is processing-java doing this?
I looked in preferences.txt but see nothing that suggests debugging is turned on or that any special arguments are to be passed to java other than memory settings.
The same sketch runs fine if loaded into the Processing IDE, but that's a clumsy way to run a sketch since I'm using an external editor.
EDIT:
I grabbed the code from Github to see if that would give better results. It does not. I poked around, added some debugging printlns, and it seems the trouble is that the code that generates the java comma nd line call is passing along a value for the java library path that includes my entire %PATH% contents. That includes paths that have 'Program Files" in their name, and I think the space in the file path is what breaks things.
What's odd is that I think this same code is used to invoke the Processing IDE, and I can use processing-java to generate an exported application. I just can't run my sketch that way.
I've been using Processing from the command-line, and used processing-java to export sketches to standalone executables.
It works but the resulting application always runs without any window borders; it appears that the export assumes "present mode" should be on. What's odd is that the resulting application has the size I set in setup(), but it has no window borders.
I can export a sketch from the IDE and manually uncheck "Full screen (present mode)" and I get what I want: a sized window that has borders and a title bar. However, I see no way to do this from the command line.
How do I turn off "Full screen (present mode)" when using processing-java to export to an application?
I've been using blob detection with the XBox Kinect to trigger events. It's kind of slow for my purposes (using Processing to send MIDI or OSC). I'm thinking I should invert the problem: instead of finding every blob and seeing where they are, instead check if certain regions of the screen are this or that color.
What's the fastest way to see if some bounded screen region has x percentage pixels of a given color (e.g., 20% are not black)?
I start with the assumption that the entire screen is colored black. I want to check the pixels bounded by, say (0,0) and (100, 100) on a 900x900 screen.
My first thought is, at setup, sum the values of pixel colors in the defined rectangle, store that, and in the draw loop recalculate that value and see by how much it differs. But I also wonder if there's a way to do an OR or XOR of some screen region and note the results.