I have installed JDK on path
JAVA_HOME variable, I opened
/etc/environment in gedit and added :
JAVA_HOME="/usr/lib/jvm/java-8-oracle" to it.
But I got error while saving it as :
Could not save the file “/etc/environment”. You do not have the permissions necessary to save the file. Please check that you typed the location correctly and try again.
Where is it going wrong? How do I set JAVA_HOME variable?