I am on windows environment and using maven to compile my project. Although I just created the project and added the dependencies for various libararies.
As I added
When you add the JAVA_HOME environment variable, if there are spaces in the path you must wrap the whole thing in quotes.
Maven ${java.home} property is set and taken from different places depending your Eclipse execution:
from the default JRE selected for the workspace
Window>Preferences>Java>Installed JREs
from the specific Eclipse project,
Java Build Path>Libraries>JRE System Library
from the Run configuration.
Run Configurations> Specific Run Configuration > JRE
Remember your JRE home paths points to a JDK or JRE under JDK