Profile or environment. You can configure one of them.
Profile:
#/Etc/profile: System-wide. profile file for the Bourne shell (SH (1 ))
# And Bourne compatible shells (bash (1), KSh (1), ash (1),...). If ["$ PS1"]; then
If ["$ Bash"]; then
PS1 = '\ U @ \ H: \ W \ $'
If [-F/etc/bash. bashrc]; then
./Etc/bash. bashrc
Fi
Else
If ["'id-U'"-EQ 0]; then
PS1 = '#'
Else
PS1 = '$'
Fi
Fi
Fi
Export java_home =/usr/lib/JVM/Java-6-sun
Export Path = $ path:/usr/lib/JVM/Java-6-sun/bin
Export
Classpath =. //:/usr/lib/JVM/Java-6-sun/lib/tools. jar:/usr/lib/JVM/Java-6-sun/lib/DT. jar:/usr/lib/JVM/Java-6-sun/lib/RT. jar:/usr/lib/JVM/Java-6-sun/lib
Umask 022 environment: Path = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin: /usr/Games"
Lang = "zh_CN.UTF-8"
Language = "zh_cn: Zh: en_us: en"
Classpath =./:/usr/lib/JVM/Java-6-sun/lib
Java_home =/usr/lib/JVM/Java-6-sun
Configure and modify the runtime environment of Java
Sudo Update-alternatives -- config Java