#!/bin/bash echo 'export JAVA_HOME=/usr/local/jdk1.8.0_202' >> /etc/profile echo 'export MAVEN_HOME=/usr/local/apache-maven-3.9.6' >> /etc/profile echo 'export PATH=${PATH}:${JAVA_HOME}/bin:${MAVEN_HOME}/bin' >> /etc/profile source /etc/profile java -version mvn -v