Same as @getman above - had spaces in my definition of JAVA_HOME. Norbert raises a fair point about the file being incorrect, rather thanthis being a genuine bug. The error message did point to a problem with the JAVA_HOME variable, but not the specific error in the /etc/environment file. As mike-kristoffersen says a more informative error message would be helpful.
Same as @getman above - had spaces in my definition of JAVA_HOME. Norbert raises a fair point about the file being incorrect, rather thanthis being a genuine bug. The error message did point to a problem with the JAVA_HOME variable, but not the specific error in the /etc/environment file. As mike-kristoffersen says a more informative error message would be helpful.