According to the answer to What are login and non-login shells? on Ask Ubuntu, 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 a non-login shell. However, I found that I have appended the java home path to the
variable and, when I use GNOME Terminal and issue the command
java, everything goes fine. Also, the value of the
PATH variable is the same as the value I defined in
In view of the above-mentioned facts, there is a conflict, what’s wrong with my understanding?