How to configure Java environment variables in Ubuntu10.10

Source: Internet
Author: User
The following method is used only in Ubuntu10.10 and has been tested successfully. bash is used in Ubuntu. Therefore, we cannot generalize the following method: vi ~ /. Bashrc (in general mode, you do not need to enter any file path) to add environment variables (assuming the jdk installation path is/usr/local/jdk) (The following content is edited using vi, very troublesome. Please check the Linuxvi operation manual on your own)

The following methods have been successfully tested only in the Ubuntu 10.10 environment:

Bash is used in Ubuntu, so it cannot be generalized.
Here are my Solutions

Vi ~ /. Bashrc (in general mode, no file path is required)

Add environment variables (assuming the jdk installation path is/usr/local/jdk)
(The following content is edited using vi, which is very troublesome. Please check the Linux vi operation manual by yourself)
Export JAVA_HOME =/usr/local/jdk

Export PATH = $ PATH: $ JAVA_HOME/bin

Export CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar

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.