Maybe you compiled a library on Mac OSX and got this error message when trying to use it in Processing:
This version of Processing only supports libraries and JAR files compiled for Java 1.6.It can happen on Lion if you upgraded to JDK 7 and will happen on Mountain Lion since it installs it by default.
A library used by this sketch was compiled for Java 1.7 or later,
and needs to be recompiled to be compatible with Java 1.6.
You can check which version of Java is running on your mac by opening a Terminal window (Applications>Utilities>Terminal.app) and typing:
- java -version
Then press [ENTER]
Note: Until 1.6, Apple made its own JRE for Mac OS. Starting with 1.7, they decided to stop and you have to use the original from ORACLE. They also removed the Java Preference Pane that used to be available in Applications>Utilities.
More info:
http://apple.stackexchange.com/questions/68743/mountain-lion-10-8-2-java-preferences-has-disappeared
First get the prefPane back by downloading and installing
this package (alternative link:
http://dl.dropbox.com/u/23516883/JavaEssentials.pkg )
Then open your freshly installed Applications>Utilities>Java Preferences.app
The utility tells you that you can drag the JRE to change the preferred order. However, if you do so, quit the app and launch it again, you will notice that your changes have not been saved. We have to do it another way.
Double-clicking on the "Java SE 7" line should bring you to the JavaVirtualMachines folder located in Library>Java. There you will find a file called "jdk1.7.0_07.jdk". Just copy it somewhere for safe keeping and delete the original (simply renaming or changing the extension will not do the trick). If you ever need 1.7, you'll just have to put "jdk1.7.0_07.jdk" back.
Now try "java -version" again and you should get something like :
- java version "1.6.0_37"
- Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11A459)
- Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)
Just compile your lib again, install, run, and Bob's your uncle.
1