Packaged jar for java 1.7 failing

I have a legacy project that use java 1.7
I wanted to package up a DL4J jar for it.
I set in the pom:
It compiles and runs fine in standalone tests however when I use the DL4J jar in the legacy project I get this error:

Caused by: java.lang.UnsupportedClassVersionError: WEB9032: Class has unsupported major or minor version numbers, which are greater than those found in the Java Runtime Environment version 1.7.0_51
at org.glassfish.web.loader.WebappClassLoader.findClass(

more information:
When I set File → Project Structure → Project SDK : 1.7

I get an error similar to this github issue: ‘nd4j not compatibel with java 7’

With this error in INDArray:
java.lang.UnsupportedClassVersionError: org/nd4j/linalg/api/ndarray/INDArray : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(
at java.lang.Class.getMethod0(
at java.lang.Class.getMethod(
at sun.launcher.LauncherHelper.getMainMethod(
at sun.launcher.LauncherHelper.checkAndLoadMain(

@craig88 the project for newer versions won’t be supporting java 7. Every JDK vendor provides 8 and 11 as LTS releases. * is already technically EOL. Java 7 much more so. Most of the java ecosystem has moved on at this point.