[TIMOB-16085] Fixed bug where JAVA_HOME beginning with a tilde was not b...

...eing resolved to the home directory before checking if the path exists.