Removed the piece of code that insert lines into /etc/environment file for Java because the variable JAVA_HOME and JAVA_OPTS must be configured on /etc/default/tomcatX directory