How to install *.bin and jdk in ubuntu
1. Down load jdk from http://www.oracle.com/technetwork/java/javase/downloads/index.html.2. Install jdb*.bin in ubuntu:
1) sudo chmod +x jdk*.bin;
2) sudo ./jdk*.bin
3. Configure java:
1) configure in profile
All user will share the enivorment parameters, so it is not very safely.
a. sudo gedit /etc/profile
b. add follow configuration in the foot of the file:
JAVA_HOME = /java/home
CLASSPATH = .:$JAVA_HOME/lib
PATH = $PATH:$JAVA_HOME/bin
export JAVA_HOME
export CLASSPATH
export PATH
Re log on.
2) configure in bash.bashrc
Only the created user can use this enivorment parameters.
a. sudo gedit /etc/profile
b. add follow configuration in the foot of the file:
set JAVA_HOME = /java/home
export JAVA_HOME
CLASSPATH = .:$JAVA_HOME/lib
export CLASSPATH
PATH = $PATH:$JAVA_HOME/bin
export PATH
Re log on.
Note: when configure enivorment parameters, key and value joined by '=', please make sure that no whitespace between key with '=' and no whitespace between '=' with value.
页:
[1]