sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/ jdk1.8.0/bin/java" 1
It's says alternatives --install needs link name path priority
Are you leaving a space between the -- and the word install? if so, don't - it needs to be
The quotes should not be necessary since none of the elements have embedded spaces - although they shouldn't do any harm.
This is beacause this command maintains symbolic links. I recommend to execute