Step 1: Check if the JDK that comes with Linux is installed
The installed CentOS will come with OpenJdk. With the command java -version , the following information will be available:
java version "1.6.0" OpenJDK Runtime Environment (build 1.6.0-b09) OpenJDK 64-Bit Server VM (build 1.6.0-b09, mixed mode)
Best to uninstall first Open openjdk, install sun company jdk.
First look at rpm -qa |
Grep java
If it is
, the following information is displayed:
java-1.4.2-gcj-compat-1.4.2.0-40jpp.115 java-1.6.0-openjdk -1.6.0.0-1.7.b09.el5
Uninstall:
rpm -e --nodeps java-1.4.2-gcj-compat-1.4.2.0-40jpp.115 rpm -e --nodeps java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5
If you can't find openjdk source, you can uninstall it like this
yum -y remove Java java-1.4.2-gcj-compat-1.4.2.0-40jpp.115 yum -y remove java java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5
The second step, Install SUN's JDK
1. Download the tarball
2. Create a new application directory (put the software you need in this directory for the same management). For example: usersoft
mkdir /
3. Copy the downloaded file to the /usersoft directory
4. Then configure the environment variable and enter the following command to enter the configuration file.
[root@localhost java]# vi /etc/profile Add
to the file export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL export JAVA_HOME=/usersoft/java/jdk1.7.0_60 export PATH =$JAVA_HOME/bin:$PATH export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
5, let the environment variables take effect. Execute the configuration file to make it take effect immediately. Enter the following command:
[root@localhost java]# source /etc/profile
View the current java installation version [root@localhost java]# java -version
End!
1. u-boot program entry address To understand the programs entry address, naturally think of the co
The companys network environment is a bit complicated, and the damn secure policy requires
vi editor is the most commonly used text editor in Linux system, vi has the reputation of the editor
VNC software is provided from other machines connected to the remote interface linux system
The difference between buffer and cache in linux free command
Linux view routing information
Linux service configuration linux system routing configuration
Linux configuration ip address
Implementation of multithreaded sorting under Linux
Redis common operation command
Analysis and repair methods of Linux file system corruption
Linux/Unix simple shortcut summary
How to solve the problem when the computer switches the input method is easy to crash
New experience Win7 new features, let you easily work
Win7 system warns that the system has insufficient memory and how to set virtual memory?
WinXP has canceled the solution to the navigation of this page
Windows2008 server and win7 how to cancel ban
The clever handling system does not have an effective network configuration. The
Anti-hacking anti-virus will be a new feature of win8?
Win7 system security features and functions large collection (1)