# Packaged jar for java 1.7 failing

**URL:** <https://community.konduit.ai/t/packaged-jar-for-java-1-7-failing/1565>\
**Category:** DL4J\
**Created:** [August 17, 2021, 2:19am UTC](https://community.konduit.ai/t/packaged-jar-for-java-1-7-failing/1565 "2021-08-17T02:19:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![craig88](https://avatars.discourse-cdn.com/v4/letter/c/b782af/32.png) [@craig88](https://community.konduit.ai/u/craig88)\
**Post date:** [August 17, 2021, 2:19am UTC](https://community.konduit.ai/t/packaged-jar-for-java-1-7-failing/1565/1 "2021-08-17T02:19:44Z")

</div>

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:  
\<java.version\>1.7\</java.version\>  
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 org.nd4j.imports.graphmapper.tf.TFGraphMapper 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(WebappClassLoader.java:948)

---

<div class="post-metadata">

**Author:** ![craig88](https://avatars.discourse-cdn.com/v4/letter/c/b782af/32.png) [@craig88](https://community.konduit.ai/u/craig88)\
**Post date:** [August 17, 2021, 8:29pm UTC](https://community.konduit.ai/t/packaged-jar-for-java-1-7-failing/1565/2 "2021-08-17T20:29:36Z")

</div>

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’

> <https://github.com/eclipse/deeplearning4j/issues/8806>
>
> \#### Issue Description
> 
> The official description of nd4j states that it is com…patible with java 7. We are running on a quite old tech stack and updating to a newer java version is an ongoing process which will take a few additional months from now. If it is possible to reintroduce compatibility with java 7, we'd really appreciate that. 
> 
> \##### Expected behavior:
> 
> The following code snippet runs on java 7 without exceptions:
> \`INDArray x = Nd4j.zeros(3,4);\`
> 
> \##### Actual behavior:
> 
> An exception is thrown. See gist: https://gist.github.com/mheck136/91e2e10ba61a7db77b7b96055bf9bec1
> 
> \#### Version Information
> 
> \* nd4j version: 1.0.0-beta6
> \* Platform information: Windows Server 2016, Oracle Java 1.7 Update 80
> 
> \#### Additional information:
> 
> I already opened a thread here: https://community.konduit.ai/t/java-7-compatibility-issues/306

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(ClassLoader.java:800)  
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)  
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)  
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)  
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)  
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)  
at java.security.AccessController.doPrivileged(Native Method)  
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)  
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)  
at java.lang.Class.getDeclaredMethods0(Native Method)  
at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)  
at java.lang.Class.getMethod0(Class.java:2774)  
at java.lang.Class.getMethod(Class.java:1663)  
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)  
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)

---

<div class="post-metadata">

**Author:** ![agibsonccc](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/agibsonccc/32/697_2.png) [@agibsonccc](https://community.konduit.ai/u/agibsonccc)\
**Post date:** [August 18, 2021, 1:31pm UTC](https://community.konduit.ai/t/packaged-jar-for-java-1-7-failing/1565/3 "2021-08-18T13:31:24Z")

</div>

@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.
