Changing the JDK used by Maven
It is possible to have more than one version of JDK installed on your system. By following some simple steps, you can specify and/or change the JDK to be used by Maven.
How to do it...
You will recall that, in the earlier section, we used Java SE 7. Let us now change to Java SE 8. To change the JDK version to Java SE 8 on Microsoft Windows, perform the following steps:
- From the command prompt, run the following command:
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_20
- For Linux or Mac, the command will be:
- Now, run the following command to check the version of Maven installed:
- To check the version of Maven installed on Microsoft Windows, run the following command from the ...