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.

mmoser (2) [Avatar] Offline
#1
I had downloaded the book's examples and - as instructed in the README file - I tried to compile them using

$ mvn compile

... but that always only yielded an "Illegal target" error message which at first I couldn't explain.

The reason - as I had to learn - was that, while I had installed Java 8 and added it to the system's path (replacing the path to the previous Java 7 installation), I had not updated the JAVA_HOME variable which still pointed to "Csmilierogram FilesJavajdk1.7.0". That yielded Maven to call the Java 7 compiler instead of Java 8.

So: it's not enough to only check for

$ java -version
java version "1.8.0_xy"

but one also has to check, that JAVA_HOME points to Java 8:
$ echo %JAVA_HOME%
Csmilierogram FilesJavajdk1.8.0

Hope that helps others running into the same issue...

Michael
raoul-gabriel.urma (37) [Avatar] Offline
#2
Re: Illegal Target when compiling examples using Maven
Great, glad to hear the problem is resolved!
R
michael.moser@freesurf.ch (4) [Avatar] Offline
#3
Re: Illegal Target when compiling examples using Maven
It would probably make sense to add that also to the short description at
https://github.com/java8/Java8InAction/ (and in the README.md file).

Just my 2 cents of wisdom...

Cheers,
Michael