processing.video on OSX 10.6 with Eclipse
February 7th, 2010 | Published in Processing | by Jeremy
Using the processing.video.* package w/ Eclipse on w/ Snow Leopard requires a couple of extra steps to make things run smoothly. The following will explain how to go about making it work. This post does not cover how to create a Processing project in Eclipse. If you are looking for that info go here: http://processing.org/learning/tutorials/eclipse/
The first step is to link the Processing video.jar file to your project. The following outlines how to go about it (assuming you’ve already created your project).
- Navigate to /Application/Processing/
- Right click the Processing icon and choose Show Package Contents (opens new Finder window)
- Navigate to Resources/Java/libraries/video/library/
- Copy the file called
video.jar - Navigate to your Processing project
- Create a folder called lib (can be called anything you want) and paste the
video.jarfile there - Back in Eclipse, right click your project file and choose Properties
- From the list on the left choose Java Build Path
- Click the Libraries tab
- Click the Add JARs… button
- Navigate to the lib folder where you pasted the
video.jarfile - Select the
video.jarfile and press OK
This should enable you to import the video package into your project. Now… if you are running Snow Leopard there is another step that you need to follow otherwise when you try to instantiate either a Capture or MovieMaker object your app will crash w/ an error containing the following message:
Caused by: java.lang.UnsatisfiedLinkError: /System/Library/Java/Extensions/libQTJNative.jnilib: no suitable image found. Did find: /System/Library/Java/Extensions/libQTJNative.jnilib: no matching architecture in universal wrapper
The reason you are seeing this error is that the Java install shipped w/ Snow Leopard will, by default, open a 64-bit version of the JVM and the processing.video.* package has some dependencies on the 32-bit JVM. I am not clear on the details of the dependency but it is clear that this crash is due to a difference between the JVMs.
Here are the steps to fixing this problem:
- Right click your project file and choose Properties
- Choose Run/Debug Settings from the list on the left
- There should be at least one build configuration in the launch configurations list, choose it and click the Edit button
- Click the Arguments tab
- In the VM arguments field and this
-d32and click the OK button
Now that you have included this argument Java will open your app in a 32-bit version of the virtual machine without problems. I’m sure there is a way to make this the default behavior for Java applications, but because this problem is specific to Processing I prefer to just set the preferences on a per project basis.




