java - Cannot find JAVA_HOME in Red Hat Server -


I am trying to find a place where the JAVA_HOME env variale is set and I ~ / .bash_profile < / Strong>, ~ / .bashrc and / etc / profile but could not find the env variable.

But when I $ JAVA_HOME its value / usr / local / java

Where else happens JAVA_HOME env variable

BTW This is a Red Hat Linux server.

file /etc/bash.bashrc , sometimes even starting Is used for bash. If not, then with grep -r BASH_HOME / etc

UPDATE

Man Bash:

When Bash is brought as an interactive login shell, or with the --login option as a non-interactive shell, it will first command the file Reads and implements ~ / .bash_profile , ~ after reading that file if that file exists, / .bash_login , and ~ / .profile , and initiatives Does exist reads commands and executes and readable.

Any more:

When an interactive shell that is not a login shell, runs and executes commands with / etc / bash .bashrc and ~ / .bashrc , if these files are present.

So there is only one file you can not notice ~ / bash_login.

Perhaps none of these files have Java AHOM and what happens is that one of these files calls another script, in that case, you can use the line through one of these scripts Line must be read Loading more than other places

Comments

Popular posts from this blog

c++ - ERROR: cannot open source file x11\xlib.h -

c - What are pthread cancelation points used for? -

c# - Show a huge number of data in DevExpress GridView -