Fix: 2787 - Spaces in path to JAVA

Fixes issue when spaces are used in path to java. This happens in console .sh files. 

See issue for more related info.