Java error for Processing.py from command line on MacOS

Hi,

I would like to use Processing.py from the command line on a MacOS machine.
I followed these “Processing.py from command line” instructions for the installation.

It seems I have an issue with the Java installation.
As indicated in the “Processing.py from command line” instructions, I downloaded JRE 8u202 from here (choosing jre-8u202-macosx-x64.dmg), executed the .dmg file, performed the installation, and I get a window saying “You have installed Java 8 Update 202” at the end of the installation.
But when in run java -version in the terminal, I get the following, which seems to indicate that the installation did not succeed and which diverts from the “Processing.py from command line” instructions:

java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)

I tried rebooting after the java installation, but that did not fix my problem.

I tried nevertheless running the basic script given as example in the instructions with this command java -jar processing-py.jar mouse_follow.py, but I get the following error:

Exception in thread "main" java.lang.UnsupportedClassVersionError: jycessing/Runner : Unsupported major.minor version 51.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
	at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
	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)

Any hint on how to fix my Java installation?

Or could the error be caused by something else?

Many thanks for your help !

1 Like