If this error occurs with the jdk use this :
progra~1 instead of program files in the path example :
c:/progra~1/java instead of c:/program files/java
It will be ok always avoid space in java code.....
it can be used for every thing in program files, otherwise put quotes at the beginning and the en of path
"c:/..../"