I am having trouble understanding why I am getting this error:
ERROR: Invalid syntax. Default option is not allowed more than '2' time(s).
Type "SETX /?" for usage.
Implementation
C:\Users>setx JAVA_HOME "C:\DOC\JDK64\1.8.0.74"
SUCCESS: Specified value was saved.
C:\Users>setx PATH "%PATH%;%JAVA_HOME%\bin"
ERROR: Invalid syntax. Default option is not allowed more than '2' time(s).
Type "SETX /?" for usage.
C:\Users>setx PATH "%PATH%;%JAVA_HOME%bin"
ERROR: Invalid syntax. Default option is not allowed more than '2' time(s).
Type "SETX /?" for usage.
setx path c:\fred
adds fred to the existing path if it's not already present. In short ignore the error. To hide it suffix> nul
to the command. – Sarette