You can check the JDK used to create a .jar file. First off, you have to unzip the .jar file using, e.g., 7zip.
As an example, I've taken pi4j-gpio-extension-1.2.jar.
Once you have the .tar file untarred, take a random .class file.
As an example, I've taken MCP23017GpioProvider.class located in package com.pi4j.gpio.extension.mcp.
Open a Git bash shell into that location.
You now have 2 possibilities to check for the JDK version used:
On a PC (Windows or Linux, should work both), you can use the file application:
Example:
$ file MCP23017GpioProvider.class
Result:
MCP23017GpioProvider.class: compiled Java class data, version 52.0 (Java 1.8)
As you can see, you get back the number 52, which corresponds to JDK 1.8 (or Java 1.8).
You can also use javap to achieve the same:
Example for Linux:
$ javap -v MCP23017GpioProvider.class | grep major
Result:
major version: 52
Example for Windows:
> javap -v MCP23017GpioProvider.class | findstr major
Result:
major version: 52
Below is a list of major numbers and their corresponding JDK version:
45.3 = Java 1.1
46 = Java 1.2
47 = Java 1.3
48 = Java 1.4
49 = Java 5
50 = Java 6
51 = Java 7
52 = Java 8
53 = Java 9
54 = Java 10
55 = Java 11
56 = Java 12
57 = Java 13
58 = Java 14
59 = Java 15
60 = Java 16
61 = Java 17
62 = Java 18
63 = Java 19
64 = Java 20
65 = Java 21
66 = Java 22
That's all, folks!