Java dl4j中的包不存在

Java dl4j中的包不存在,java,maven,intellij-idea,package,cannot-find-symbol,Java,Maven,Intellij Idea,Package,Cannot Find Symbol,我正在尝试使用1.8Java64XJDK在IntelliJ中启动dl4j示例 我完全按照你的指示去做 现在最后一步不起作用了。开始时,我会收到数百个异常,如: Error:(3,35) java:package org.deeplearning4j.berkeley does not exist 或 所以我想问题与包裹的导入有关。我需要补充一点,我是IntelliJ的新手。我需要考虑一些特别的东西吗? 是否可能因为使用Java 8而需要为Maven重建pom.xml 谢谢你的建议 另外,m

我正在尝试使用1.8Java64XJDK在IntelliJ中启动dl4j示例

我完全按照你的指示去做

现在最后一步不起作用了。开始时,我会收到数百个异常,如:

 Error:(3,35) java:package org.deeplearning4j.berkeley does not exist 

所以我想问题与包裹的导入有关。我需要补充一点,我是IntelliJ的新手。我需要考虑一些特别的东西吗? 是否可能因为使用Java 8而需要为Maven重建pom.xml

谢谢你的建议

另外,maven clean install(版本:3.16.0-4-amd64)引发了一些异常:

[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:dl4j-examples:jar:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:dl4j-spark:jar:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:dl4j-spark-examples:pom:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:datavec-examples:jar:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:dl4j-cuda-specific-examples:jar:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:nd4j-examples:jar:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:rl4j-examples:jar:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 147, column 21
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:arbiter-examples:jar:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:deeplearning4j-examples-parent:pom:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ line 44, column 21
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] DeepLearning4j Examples Parent
[INFO] DeepLearning4j Examples
[INFO] dl4j-spark-examples
[INFO] dl4j-spark
[INFO] datavec-examples
[INFO] DeepLearning4j CUDA special examples
[INFO] nd4j-examples
[INFO] Reinforcement Learning4j Examples
[INFO] arbiter-examples
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building DeepLearning4j Examples Parent 0.7-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ deeplearning4j-examples-parent ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-default) @ deeplearning4j-examples-parent ---
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireMavenVersion failed with message:
********** Minimum Maven Version is 3.3.1. Please upgrade Maven before continuing (run "mvn --version" to check). **********
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] DeepLearning4j Examples Parent .................... FAILURE [0.902s]
[INFO] DeepLearning4j Examples ........................... SKIPPED
[INFO] dl4j-spark-examples ............................... SKIPPED
[INFO] dl4j-spark ........................................ SKIPPED
[INFO] datavec-examples .................................. SKIPPED
[INFO] DeepLearning4j CUDA special examples .............. SKIPPED
[INFO] nd4j-examples ..................................... SKIPPED
[INFO] Reinforcement Learning4j Examples ................. SKIPPED
[INFO] arbiter-examples .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.137s
[INFO] Finished at: Thu Jan 05 17:13:18 CET 2017
[INFO] Final Memory: 7M/118M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.4.1:enforce (enforce-default) on project deeplearning4j-examples-parent: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [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] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

可能有点晚了,但我也犯了同样的错误

对我来说,JAVA_HOME变量被设置为JRE而不是JDK。 因此,将JAVA_HOME变量设置为如下内容:C:\Program Files\JAVA\jdk1.8.0_112(当然,版本会有所不同)

否则,将显示帮助1的链接:
还有一些常见的例子说明了为什么它可能会失败…

您所说的最后一步是什么意思?在您自己的项目中使用DL4J:配置POM.xml文件?开始示例。运行项目..我测试了项目,它对我有效。在导入到intellij之前,请确保“mvn clean install”命令已成功,并且您正在将其作为maven项目导入。使用“mvn clean install”语句时,我确实遇到一些错误。[错误]无法执行目标org.apache.maven.plugins:maven enforcer插件:1.4.1:ProjectDeepLearning4J上的强制(强制默认)示例父:某些强制规则失败。查看上面解释规则失败原因的特定消息。->[Help 1]您是否“查看上面解释规则失败原因的特定消息”?请将maven命令输出的最后一块以及maven版本添加到您的帖子中。
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:dl4j-examples:jar:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:dl4j-spark:jar:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:dl4j-spark-examples:pom:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:datavec-examples:jar:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:dl4j-cuda-specific-examples:jar:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:nd4j-examples:jar:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:rl4j-examples:jar:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 147, column 21
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:arbiter-examples:jar:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:deeplearning4j-examples-parent:pom:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ line 44, column 21
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] DeepLearning4j Examples Parent
[INFO] DeepLearning4j Examples
[INFO] dl4j-spark-examples
[INFO] dl4j-spark
[INFO] datavec-examples
[INFO] DeepLearning4j CUDA special examples
[INFO] nd4j-examples
[INFO] Reinforcement Learning4j Examples
[INFO] arbiter-examples
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building DeepLearning4j Examples Parent 0.7-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ deeplearning4j-examples-parent ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-default) @ deeplearning4j-examples-parent ---
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireMavenVersion failed with message:
********** Minimum Maven Version is 3.3.1. Please upgrade Maven before continuing (run "mvn --version" to check). **********
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] DeepLearning4j Examples Parent .................... FAILURE [0.902s]
[INFO] DeepLearning4j Examples ........................... SKIPPED
[INFO] dl4j-spark-examples ............................... SKIPPED
[INFO] dl4j-spark ........................................ SKIPPED
[INFO] datavec-examples .................................. SKIPPED
[INFO] DeepLearning4j CUDA special examples .............. SKIPPED
[INFO] nd4j-examples ..................................... SKIPPED
[INFO] Reinforcement Learning4j Examples ................. SKIPPED
[INFO] arbiter-examples .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.137s
[INFO] Finished at: Thu Jan 05 17:13:18 CET 2017
[INFO] Final Memory: 7M/118M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.4.1:enforce (enforce-default) on project deeplearning4j-examples-parent: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [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] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException