Install JDK under Linux as follows:
Step 1: Check if the JDK that comes with Linux is installed
(1) View the installed jdk: Br>
# rpm -qa|
Grep jdk ← View jdk information or execute directly
or
# rpm -q jdk
or
# java -version
(2)rpm -qa|
Grep jdk Uninstall:
(3) rpm -e rpm package name (see above) If there is a dependency, first uninstall the upper layer.
Step 2: Install JDK
<1>Download jdk-1_5_0_14-linux-i586-rpm.bin or jdk-1_5_0_14-linux-i586.bin
< from SUN p> Create a new java folder under /usr and place the installation package in the /usr/java directory
# mkdir /usr/java
<2>Install JDK
# cd /usr/java(mkdir java – this directory needs to be created)
1jdk-1_5_0_16-linux-i586-rpm.bin file installation
# chmod 777 jdk-1_5_0_16- Linux-i586-rpm.bin ← modified to executable
# ./jdk-1_5_0_16-linux-i586-rpm.bin ← select yes to agree to the above protocol
# rpm - Ivh jdk-1_5_0_16-linux-i586.rpm ← Select yes until the installation is complete
2jdk-1_5_0_16-linux-i586.bin file installation
#chmod a+x jdk-1_5_0_16-linux -i586.bin ← Make the current user have execute permission
# ./jdk-1_5_0_16-linux-i586.bin ← Select yes until the installation is complete
Step 3: Configure environment variables
<1># vi /etc/profile
<2>Add the following lines at the end:
export JAVA_HOME=/usr/java/jdk1.5.0 _16
export CLASSP ATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
<3># source /etc/profile takes effect after execution
Step 4: Test JDK
#vi hello.java
public class hello {
public static void main(String args [ ])
{
System.out.println("Hello World!");
System.out.println("2011/1/14");
}
}
# javac hello.java
# java hello
Hello World!
2011/1/14
Seeing this means the installation was successful!
Mount windows shared directory on Linux 1.Share windows folder Create a password-enabled user before
Preparation before installation 1. kail linux 2.0 download (multiple versions of ISO) Downl
1. u-boot program entry address To understand the programs entry address, naturally think of the co
For the Windows operating system, if you forget the administrator password, it is still qui
How to run the process in Linux
Ubuntu13.04 Use plymouth to modify the splash screen
The implementation method of batch parallel telnet peer port under linux
RACK provides power source for TCP BBR
How to configure peer-to-peer VPN
Linux/CentOS to open the firewall
How to configure Chinese input method in Linux environment
Hibernate option disappeared in Windows 8
Is Fetion texting free? How to use Fetion to send text messages?
Win10 system continues to appear "resource manager has stopped working" tips how to deal with?
Computer physical memory runs high
WeChat video chat how to beauty WeChat video chat beauty method
The most perfect way to restore win8 start button!
Microsoft Consumer Edition Win7 technical support period extends ten years to 2020