According to the answer of the question, https://askubuntu.com/questions/155865/what-are-login-and-non-login-shells, gnome terminal is a type of non-login shell. As pointed out in the excellent book, A Practical Guide to Fedora and Red Hat Enterprise Linux, 6th Edition:
an interactive non-login shell executes commands in the ~/.bashrc file. The default ~/.bashrc file calls /etc/bashrc.
As a result,
/etc/profile won't be processed in non-login shell. However,I found that I had append the java home path to the
variable, when I use gnome terminal and issue the command
java, everything goes fine and the value of
$PATH variable is the same as the value I define in
In view of the above-mentioned facts, there is a conflict, what’s wrong with my understanding?