Setup Java Home Environment Variables
~$ cd /etc/profile.d/
/etc/profile.d$ sudo touch java.sh
/etc/profile.d$ sudo nano java.sh
copy file ini ke dalam nano
export JAVA_HOME=/usr/local/java/ jdk1.8.0_144
export PATH=$JAVA_HOME/bin:$PATH
save dan exit nano, untuk pastikan
samada berjaya atau tidak,
/etc/profile.d$ cat java.sh
export JAVA_HOME=/usr/local/java/ jdk1.8.0_144
export PATH=$JAVA_HOME/bin:$PATH
sumber rujukan :
https://help.ubuntu.com/community/EnvironmentVariables
https://help.ubuntu.com/community/EnvironmentVariables




