Install JDK and environment settings in UNIX and Linux

Source: Internet
Author: User
Tags echo command
I have successfully installed JDK (jdk-1_5_0_02-linux-i586.rpm) on the HP Workstation visualize c3600 UNIX System and my computer Fedora Core 3. The process is simple:

1. First download JDK (jdk-1_5_0_02-linux-i586.rpm) from the Internet, recommend Sun's official website www.sun.com, download and put it in the/home directory, of course, other places also do.
Go to the installation directory
# Cd/home
# Cp jdk-1_5_0_02-linux-i586.rpm/usr/local
# Cd/usr/local
Add executable permissions to all users
# Chmod + x jdk-1_5_0_02-linux-i586.rpm.bin
#./Jdk-1_5_0_02-linux-i586.rpm.bin
The file jdk-1_5_0_02-linux-i586.rpm is generated, and executable permissions are also added to all users
# Chmod + x jdk-1_5_0_02-linux-i586.rpm
Installer
# Rpm-IVH jdk-1_5_0_02-linux-i586.rpm
If the installation protocol is displayed, press <enter>.

2. Set environment variables.
# Vi/etc/profile
Add at the end
# Set Java environment
Java_home =/usr/Java/jdk-1_5_0_02
Classpath =.: $ java_home/lib. Tools. Jar
Path = $ java_home/bin: $ path
Export java_home classpath path
Save and exit.

To enable JDK to be used by all users, you can:
VI/etc/profile. d/Java. Sh
Enter the following content in the new java. Sh file:
# Set Java environment
Java_home =/usr/Java/jdk-1_5_0_02
Classpath =.: $ java_home/lib. Tools. Jar
Path = $ java_home/bin: $ path
Export java_home classpath path
Save and exit, and then assign the permission to Java. sh: chmod 755/etc/profile. d/Java. Sh

3. Use the echo command on the terminal to check the environment variable settings.
# Echo $ java_home
# Echo $ classpath
# Echo $ path

4. Check whether JDK is successfully installed.
# Java-version
If you see the JVM version and related information, the installation is successful!


 

I have successfully installed JDK (jdk-1_5_0_02-linux-i586.rpm) on the HP Workstation visualize c3600 UNIX System and my computer Fedora Core 3. The process is simple:

1. First download JDK (jdk-1_5_0_02-linux-i586.rpm) from the Internet, recommend Sun's official website www.sun.com, download and put it in the/home directory, of course, other places also do.
Go to the installation directory
# Cd/home
# Cp jdk-1_5_0_02-linux-i586.rpm/usr/local
# Cd/usr/local
Add executable permissions to all users
# Chmod + x jdk-1_5_0_02-linux-i586.rpm.bin
#./Jdk-1_5_0_02-linux-i586.rpm.bin
The file jdk-1_5_0_02-linux-i586.rpm is generated, and executable permissions are also added to all users
# Chmod + x jdk-1_5_0_02-linux-i586.rpm
Installer
# Rpm-IVH jdk-1_5_0_02-linux-i586.rpm
If the installation protocol is displayed, press <enter>.

2. Set environment variables.
# Vi/etc/profile
Add at the end
# Set Java environment
Java_home =/usr/Java/jdk-1_5_0_02
Classpath =.: $ java_home/lib. Tools. Jar
Path = $ java_home/bin: $ path
Export java_home classpath path
Save and exit.

To enable JDK to be used by all users, you can:
VI/etc/profile. d/Java. Sh
Enter the following content in the new java. Sh file:
# Set Java environment
Java_home =/usr/Java/jdk-1_5_0_02
Classpath =.: $ java_home/lib. Tools. Jar
Path = $ java_home/bin: $ path
Export java_home classpath path
Save and exit, and then assign the permission to Java. sh: chmod 755/etc/profile. d/Java. Sh

3. Use the echo command on the terminal to check the environment variable settings.
# Echo $ java_home
# Echo $ classpath
# Echo $ path

4. Check whether JDK is successfully installed.
# Java-version
If you see the JVM version and related information, the installation is successful!


 

I have successfully installed JDK (jdk-1_5_0_02-linux-i586.rpm) on the HP Workstation visualize c3600 UNIX System and my computer Fedora Core 3. The process is simple:

1. First download JDK (jdk-1_5_0_02-linux-i586.rpm) from the Internet, recommend Sun's official website www.sun.com, download and put it in the/home directory, of course, other places also do.
Go to the installation directory
# Cd/home
# Cp jdk-1_5_0_02-linux-i586.rpm/usr/local
# Cd/usr/local
Add executable permissions to all users
# Chmod + x jdk-1_5_0_02-linux-i586.rpm.bin
#./Jdk-1_5_0_02-linux-i586.rpm.bin
The file jdk-1_5_0_02-linux-i586.rpm is generated, and executable permissions are also added to all users
# Chmod + x jdk-1_5_0_02-linux-i586.rpm
Installer
# Rpm-IVH jdk-1_5_0_02-linux-i586.rpm
If the installation protocol is displayed, press <enter>.

2. Set environment variables.
# Vi/etc/profile
Add at the end
# Set Java environment
Java_home =/usr/Java/jdk-1_5_0_02
Classpath =.: $ java_home/lib. Tools. Jar
Path = $ java_home/bin: $ path
Export java_home classpath path
Save and exit.

To enable JDK to be used by all users, you can:
VI/etc/profile. d/Java. Sh
Enter the following content in the new java. Sh file:
# Set Java environment
Java_home =/usr/Java/jdk-1_5_0_02
Classpath =.: $ java_home/lib. Tools. Jar
Path = $ java_home/bin: $ path
Export java_home classpath path
Save and exit, and then assign the permission to Java. sh: chmod 755/etc/profile. d/Java. Sh

3. Use the echo command on the terminal to check the environment variable settings.
# Echo $ java_home
# Echo $ classpath
# Echo $ path

4. Check whether JDK is successfully installed.
# Java-version
If you see the JVM version and related information, the installation is successful!


 

I have successfully installed JDK (jdk-1_5_0_02-linux-i586.rpm) on the HP Workstation visualize c3600 UNIX System and my computer Fedora Core 3. The process is simple:

1. First download JDK (jdk-1_5_0_02-linux-i586.rpm) from the Internet, recommend Sun's official website www.sun.com, download and put it in the/home directory, of course, other places also do.
Go to the installation directory
# Cd/home
# Cp jdk-1_5_0_02-linux-i586.rpm/usr/local
# Cd/usr/local
Add executable permissions to all users
# Chmod + x jdk-1_5_0_02-linux-i586.rpm.bin
#./Jdk-1_5_0_02-linux-i586.rpm.bin
The file jdk-1_5_0_02-linux-i586.rpm is generated, and executable permissions are also added to all users
# Chmod + x jdk-1_5_0_02-linux-i586.rpm
Installer
# Rpm-IVH jdk-1_5_0_02-linux-i586.rpm
If the installation protocol is displayed, press <enter>.

2. Set environment variables.
# Vi/etc/profile
Add at the end
# Set Java environment
Java_home =/usr/Java/jdk-1_5_0_02
Classpath =.: $ java_home/lib. Tools. Jar
Path = $ java_home/bin: $ path
Export java_home classpath path
Save and exit.

To enable JDK to be used by all users, you can:
VI/etc/profile. d/Java. Sh
Enter the following content in the new java. Sh file:
# Set Java environment
Java_home =/usr/Java/jdk-1_5_0_02
Classpath =.: $ java_home/lib. Tools. Jar
Path = $ java_home/bin: $ path
Export java_home classpath path
Save and exit, and then assign the permission to Java. sh: chmod 755/etc/profile. d/Java. Sh

3. Use the echo command on the terminal to check the environment variable settings.
# Echo $ java_home
# Echo $ classpath
# Echo $ path

4. Check whether JDK is successfully installed.
# Java-version
If you see the JVM version and related information, the installation is successful!


 

I have successfully installed JDK (jdk-1_5_0_02-linux-i586.rpm) on the HP Workstation visualize c3600 UNIX System and my computer Fedora Core 3. The process is simple:

1. First download JDK (jdk-1_5_0_02-linux-i586.rpm) from the Internet, recommend Sun's official website www.sun.com, download and put it in the/home directory, of course, other places also do.
Go to the installation directory
# Cd/home
# Cp jdk-1_5_0_02-linux-i586.rpm/usr/local
# Cd/usr/local
Add executable permissions to all users
# Chmod + x jdk-1_5_0_02-linux-i586.rpm.bin
#./Jdk-1_5_0_02-linux-i586.rpm.bin
The file jdk-1_5_0_02-linux-i586.rpm is generated, and executable permissions are also added to all users
# Chmod + x jdk-1_5_0_02-linux-i586.rpm
Installer
# Rpm-IVH jdk-1_5_0_02-linux-i586.rpm
If the installation protocol is displayed, press <enter>.

2. Set environment variables.
# Vi/etc/profile
Add at the end
# Set Java environment
Java_home =/usr/Java/jdk-1_5_0_02
Classpath =.: $ java_home/lib. Tools. Jar
Path = $ java_home/bin: $ path
Export java_home classpath path
Save and exit.

To enable JDK to be used by all users, you can:
VI/etc/profile. d/Java. Sh
Enter the following content in the new java. Sh file:
# Set Java environment
Java_home =/usr/Java/jdk-1_5_0_02
Classpath =.: $ java_home/lib. Tools. Jar
Path = $ java_home/bin: $ path
Export java_home classpath path
Save and exit, and then assign the permission to Java. sh: chmod 755/etc/profile. d/Java. Sh

3. Use the echo command on the terminal to check the environment variable settings.
# Echo $ java_home
# Echo $ classpath
# Echo $ path

4. Check whether JDK is successfully installed.
# Java-version
If you see the JVM version and related information, the installation is successful!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.