Java error for from command line on MacOS


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

It seems I have an issue with the Java installation.
As indicated in the “ 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 “ 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, 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(
	at java.lang.ClassLoader.defineClass(
	at Method)
	at java.lang.ClassLoader.loadClass(
	at sun.misc.Launcher$AppClassLoader.loadClass(
	at java.lang.ClassLoader.loadClass(

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