# Failed to build dl4j-examples, compilation error

**URL:** <https://community.konduit.ai/t/failed-to-build-dl4j-examples-compilation-error/2007>\
**Category:** DL4J\
**Created:** [September 7, 2022, 6:44pm UTC](https://community.konduit.ai/t/failed-to-build-dl4j-examples-compilation-error/2007 "2022-09-07T18:44:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TempKonduitUser1](https://avatars.discourse-cdn.com/v4/letter/t/76d3ee/32.png) [@TempKonduitUser1](https://community.konduit.ai/u/TempKonduitUser1)\
**Post date:** [September 7, 2022, 6:44pm UTC](https://community.konduit.ai/t/failed-to-build-dl4j-examples-compilation-error/2007/1 "2022-09-07T18:44:25Z")

</div>

Have clone the newest version of dl4j-examples.  
Ran the following command for dl4j-examples:  
_mvn clean install_  
but the following error is reported:  
_[INFO] Changes detected - recompiling the module!_  
_[INFO] Compiling 117 source files to …\dl4j-examples\dl4j-examples\target\classes_  
_[INFO] -------------------------------------------------------------_  
_[ERROR] COMPILATION ERROR :_  
_[INFO] -------------------------------------------------------------_  
_[ERROR] …/dl4j-examples/dl4j-examples/src/main/java/org/deeplearning4j/examples/advanced/features/transferlearning/editlastlayer/EditLastLayerOthersFrozen.java:[23,47] 无法访问(cannot access)org.deeplearning4j.nn.conf.distribution.NormalDistribution_  
_错误的类文件(incorrect class file): ….m2\repository\org\deeplearning4j\deeplearning4j-nn\1.0.0-M2.1\deeplearning4j-nn-1.0.0-M2.1.jar(org/deeplearning4j/nn/conf/distribution/NormalDistribution.class)_  
_类文件具有错误的版本 55.0, 应为 52.0(incorrect version of class file 55.0, should be 52.0)_  
_请删除该文件或确保该文件位于正确的类路径子目录中。(Please delete this file or garantee that file is within the correct subdirectory of the class path.)_  
_[INFO] 1 error_  
_[INFO] -------------------------------------------------------------_  
_[INFO] ------------------------------------------------------------------------_  
_[INFO] BUILD FAILURE_  
_[INFO] ------------------------------------------------------------------------_  
_[INFO] Total time: 04:17 min_  
_[INFO] Finished at: 2022-09-08T02:29:51+08:00_  
_[INFO] ------------------------------------------------------------------------_  
_[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project dl4j-examples: Compilation failure_  
_[ERROR] …/dl4j-examples/dl4j-examples/src/main/java/org/deeplearning4j/examples/advanced/features/transferlearning/editlastlayer/EditLastLayerOthersFrozen.java:[23,47] 无法访问(cannot access)org.deeplearning4j.nn.conf.distribution.NormalDistribution_  
_[ERROR] 错误的类文件(incorrect class file): ….m2\repository\org\deeplearning4j\deeplearning4j-nn\1.0.0-M2.1\deeplearning4j-nn-1.0.0-M2.1.jar(org/deeplearning4j/nn/conf/distribution/NormalDistribution.class)_  
_[ERROR] 类文件具有错误的版本 55.0, 应为 52.0(incorrect version of class file 55.0, should be 52.0)_  
_[ERROR] 请删除该文件或确保该文件位于正确的类路径子目录中。(Please delete this file or garantee that file is within the correct subdirectory of the class path.)_  
_[ERROR]_  
_[ERROR] → [Help 1]_  
_[ERROR]_  
_[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch._  
_[ERROR] Re-run Maven using the -X switch to enable full debug logging._  
_[ERROR]_  
_[ERROR] For more information about the errors and possible solutions, please read the following articles:_  
_[ERROR] [Help 1] [MojoFailureException - Apache Maven - Apache Software Foundation](http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException)_  
What could be the cause? Thanks in advance!  
Any hint/guidance would be appreciated.

---

<div class="post-metadata">

**Author:** ![TempKonduitUser1](https://avatars.discourse-cdn.com/v4/letter/t/76d3ee/32.png) [@TempKonduitUser1](https://community.konduit.ai/u/TempKonduitUser1)\
**Post date:** [September 9, 2022, 1:37am UTC](https://community.konduit.ai/t/failed-to-build-dl4j-examples-compilation-error/2007/2 "2022-09-09T01:37:59Z")

</div>

Is this error very difficult to solve for DL4J expert?

---

<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:** [September 9, 2022, 1:39am UTC](https://community.konduit.ai/t/failed-to-build-dl4j-examples-compilation-error/2007/3 "2022-09-09T01:39:26Z")

</div>

@TempKonduitUser1 please use java 11. We mention the upgrade to the java version in the release notes. All of your problems are either unrelated to the library itself (I can’t fix your networking issues) or just not being up to date with the release.

Changes like that will happen. Always try to read the release notes. We make that as easy as possible by highlighting important changes for users:

> **[1.0.0-M2.1](https://deeplearning4j.konduit.ai/release-notes/1.0.0-m2.1)**

Your error here is actually a general java error that is very solvable with a search engine as well. If you copy and paste that error message you’d see that that was a complaint from the compiler about java 8 trying to compile with java 11 source code/libraries.
