我的pom.xml中具有以下Maven依赖项:
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>20.0</version>
</dependency>
A)在使用Java 1.8.0_171的Ubuntu 16.04.5 LTS(GNU / Linux 4.4.0-119-generic x86_64)上的wildfly-13.0.0.Final上运行它时,它抱怨缺少Guava库(这是Guava版本<20.0):
2018-07-23 10:43:21,718 ERROR [stderr] (Thread-182) Exception in thread "Thread-182" java.lang.NoSuchMethodError: com.google.common.collect.Sets$SetView.iterator()Lcom/google/common/collect/UnmodifiableIterator;
2018-07-23 10:43:21,718 ERROR [stderr] (Thread-182) at org.reflections.Reflections.expandSuperTypes(Reflections.java:380)
2018-07-23 10:43:21,719 ERROR [stderr] (Thread-182) at org.reflections.Reflections.<init>(Reflections.java:126)
2018-07-23 10:43:21,719 ERROR [stderr] (Thread-182) at org.nd4j.linalg.api.ops.factory.DefaultOpFactory.<init>(DefaultOpFactory.java:71)
2018-07-23 10:43:21,719 ERROR [stderr] (Thread-182) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
2018-07-23 10:43:21,719 ERROR [stderr] (Thread-182) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
2018-07-23 10:43:21,719 ERROR [stderr] (Thread-182) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
2018-07-23 10:43:21,719 ERROR [stderr] (Thread-182) at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
2018-07-23 10:43:21,719 ERROR [stderr] (Thread-182) at java.lang.Class.newInstance(Class.java:442)
2018-07-23 10:43:21,719 ERROR [stderr] (Thread-182) at org.nd4j.linalg.factory.Nd4j.initWithBackend(Nd4j.java:6192)
2018-07-23 10:43:21,720 ERROR [stderr] (Thread-182) at org.nd4j.linalg.factory.Nd4j.initContext(Nd4j.java:6087)
2018-07-23 10:43:21,720 ERROR [stderr] (Thread-182) at org.nd4j.linalg.factory.Nd4j.<clinit>(Nd4j.java:201)
2018-07-23 10:43:21,720 ERROR [stderr] (Thread-182) at java.lang.Thread.run(Thread.java:748)
B)它可以在具有Java 1.8.0_144的Mac OS X 10.13.5上运行,没有错误。
谢谢。