This method seems to work best for me;
There is a script /etc/profile that sets up environment variables and that also includes any scripts in /etc/profile.d so I chose to create a file /etc/profile.d/java.sh with 755 permissions with the following contents;
export JAVA_HOME="/opt/jdk1.8.0_341"
export PATH=$JAVA_HOME/bin:$PATH
No comments:
Post a Comment
Note: only a member of this blog may post a comment.