Running OSMOSIS on Windows 10 UnsupportedClassVersionError

Hi everybody.

I installed Java JRE and Osmosis as described in:

https://wiki.openstreetmap.org/wiki/Osmosis/Quick_Install_(Windows)

It seems that I have installed the latest versions. However when running osmosis.bat I get the error:

“Exception in thread “main” java.lang.UnsupportedClassVersionError: org/openstreetmap/osmosis/core/Osmosis has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0”

If you install a java 17 compatible runtime, best from https://adoptium.net/, I suspect all will be fine and dandy. You seem to be running a java 8 jre and that doesn’t support modern java.

C:\Program Files (x86)\Common Files\Oracle\Java\java8path
and
C:\Program Files (x86)\Common Files\Oracle\Java\javapath