Ubuntu installation JDKjdk-6u32-linux-i586.bin installation path involves commands: cp/sudo/env/sourcexx/sudovi/etc/profile # setjavaenvironmentJAVA_HOME =/usr/jdk1.6.0 _ 32 CLASSPATH =.: $
Install JDK in Ubuntu
Jdk-6u32-linux-i586.bin
Installation path
Commands involved:
Cp/sudo/env/source xx/
Sudo vi/etc/profile
- # Set java environment
- JAVA_HOME =/usr/jdk1.6. 0_32
- CLASSPATH =.: $ JAVA_HOME/lib: $ CLASSPATH
- PATH = $ JAVA_HOME/bin: $ PATH
- Export JAVA_HOME CLASSPATH PATH
Source/etc/profile
Env | grep xxx
Problem:
Modify/etc/profile, and create a new terminal. echo $ JAVA_HOME does not exist.
About i386/i586/
Ubunu environment variable settings
/Etc/profile: This file sets the environment information for each user in the system. When the user logs on for the first time, this file is executed.
And collect shell settings from the configuration file in the/etc/profile. d directory.
/Etc/bashrc: execute this file for every user running bash shell. When bash shell is opened, the file is read.
Current User:
~ /. Bash_profile: each user can use this file to input the shell information dedicated to their own use. When a user logs on, this file is only executed once! By default, it sets some environment variables to execute the user's. bashrc file.
~ /. Bashrc: This file contains bash information dedicated to your bash shell. This file is read when you log on and every time you open a new shell.
~ /. Bash_logout: execute this file every time you exit the system (exit bash shell.
Reference: http://www.linuxidc.com/Linux/2009-12/23735.htm