Installed with RedHatLinux5.4, the system comes with Java1.4 by default, but now generally use Java1.6, java1.6 PATH is/usr/java/jdk6 current PATH =/usr/lib/qt-3.3/bin: /usr/kerberos/bin:/usr/local/bin:/usr/bin:/home/bardwu/bin:/usr/java/jdk6/bin: /home/B
When Red Hat Linux 5.4 is installed, the system comes with Java 1.4 by default, but now Java 1.6 is generally used. The path of java1.6 is/usr/java/jdk6.
Current PATH =/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin: /home/bardwu/bin:/usr/java/jdk6/bin:/home/bardwu/bin
We need to use the. bash_profile file in the default directory.
. Bash_profile is like this:
- #. Bash_profile
- # Get the aliases and functions
- If[-F ~ /. Bashrc]; then
- .~ /. Bashrc
- Fi
- # User specific environment and startup programs
- PATH = $ PATH: $ HOME/bin
- Export PATH
We need to modify this line: PATH = $ PATH: $ HOME/bin
Change to: PATH =/usr/java/jdk6/bin: $ PATH: $ HOME/bin
Execute this script. bash_profile
Try this way: java-version will show that Java is 1.6.
If it is modified to: PATH = $ PATH: $ HOME/bin:/usr/java/jdk6/bin
Oh, execute the script.
Let's take a look at the java version or java1.4.