The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

326465 (1) [Avatar] Offline
#1
Dear Author, it seems like for java 8 in action examples there is a requirement for java 9 JDK which is not available for me. And because of that while trying to run any example starting with chap1, I am getting below errors:

Error:(7, 35) java: package org.openjdk.jmh.annotations does not exist
Error:(8, 35) java: package org.openjdk.jmh.annotations does not exist
Error:(9, 35) java: package org.openjdk.jmh.annotations does not exist
Error:(10, 35) java: package org.openjdk.jmh.annotations does not exist
Error:(11, 35) java: package org.openjdk.jmh.annotations does not exist
Error:(12, 35) java: package org.openjdk.jmh.annotations does not exist
Error:(13, 35) java: package org.openjdk.jmh.annotations does not exist
Error:(14, 35) java: package org.openjdk.jmh.annotations does not exist
Error:(15, 35) java: package org.openjdk.jmh.annotations does not exist
Error:(16, 35) java: package org.openjdk.jmh.annotations does not exist
Error:(17, 35) java: package org.openjdk.jmh.annotations does not exist
Error:(19, 2) java: cannot find symbol
symbol: class State
Error:(20, 2) java: cannot find symbol
symbol: class BenchmarkMode
Error:(21, 2) java: cannot find symbol
symbol: class OutputTimeUnit
Error:(22, 2) java: cannot find symbol
symbol: class Fork
Error:(23, 2) java: cannot find symbol
symbol: class Measurement
Error:(24, 2) java: cannot find symbol
symbol: class Warmup
Error:(29, 6) java: cannot find symbol
symbol: class Benchmark
location: class lambdasinaction.chap7.ParallelStreamBenchmark
Error:(38, 6) java: cannot find symbol
symbol: class Benchmark
location: class lambdasinaction.chap7.ParallelStreamBenchmark
Error:(43, 6) java: cannot find symbol
symbol: class Benchmark
location: class lambdasinaction.chap7.ParallelStreamBenchmark
Error:(48, 6) java: cannot find symbol
symbol: class Benchmark
location: class lambdasinaction.chap7.ParallelStreamBenchmark
Error:(53, 6) java: cannot find symbol
symbol: class Benchmark
location: class lambdasinaction.chap7.ParallelStreamBenchmark
Error:(58, 6) java: cannot find symbol
symbol: class TearDown
location: class lambdasinaction.chap7.ParallelStreamBenchmark
/java8/Java8InAction/src/main/java/lambdasinaction/chap10/OptionalMain.java
Error:(21, 32) java: invalid method reference
cannot find symbol
symbol: method stream()
location: class java.util.Optional
java8/Java8InAction/src/main/java/lambdasinaction/chap10/OperationsWithOptional.java
Error:(15, 38) java: cannot find symbol
symbol: method or(()->of(4))
location: variable opt1 of type java.util.Optional<java.lang.Integer>
Error:(18, 14) java: cannot find symbol
symbol: method or(()->of(4))
location: class java.util.Optional<java.lang.Integer>
java8/Java8InAction/src/main/java/lambdasinaction/chap6/Grouping.java
Error:(36, 64) java: cannot find symbol
symbol: method flatMapping((dish)->di[...]eam(),java.util.stream.Collector<java.lang.Object,capture#1 of ?,java.util.Set<java.lang.Object>>)
location: class lambdasinaction.chap6.Grouping
Error:(36, 49) java: invalid method reference
non-static method getType() cannot be referenced from a static context
Error:(41, 64) java: cannot find symbol
symbol: method filtering((dish)->di[...]> 500,java.util.stream.Collector<java.lang.Object,capture#2 of ?,java.util.List<java.lang.Object>>)
location: class lambdasinaction.chap6.Grouping
Error:(41, 49) java: invalid method reference
non-static method getType() cannot be referenced from a static context
java8/Java8InAction/src/main/java/lambdasinaction/chap12/DateTimeExamples.java
Warning:(42, 21) java: Date(int,int,int) in java.util.Date has been deprecated
java8/Java8InAction/src/main/java/lambdasinaction/chap6/PartitionPrimeNumbers.java
Error:(36, 31) java: cannot find symbol
symbol: method takeWhile((i)->i <= [...]eRoot)
location: interface java.util.stream.Stream<java.lang.Integer>
java8/Java8InAction/src/main/java/lambdasinaction/appc/StreamForker.java
Information:java: java8/Java8InAction/src/main/java/lambdasinaction/appc/StreamForker.java uses unchecked or unsafe operations.
Information:java: Recompile with -Xlint:unchecked for details.