Build a java environment In debian

Source: Internet
Author: User
Debian: Set up a java environment-Debian information for the Linux release. The following is a detailed description. 1. Check sources. lst
Java-related software should be similar to sources. lst in the contrib category.

Deb http://debian.cn99.com/debian stable main non-free contrib

2. Download jdk1.5
# Apt-get install sun-java5-bin sun-java5-jdk sun-java5-fonts sun-java5-plugin

3. Set Environment Variables
# Vi/etc/profile

Append to/etc/profile: (my installation path is/usr/lib/jvm/java-1.5.0-sun ---> default)

PATH = $ PATH:/usr/lib/jvm/java-1.5.0-sun/bin:/usr/lib/jvm/java-1.5.0-sun/jre/bin
JAVA_HOME =/usr/lib/jvm/java-1.5.0-sun
JRE_HOME =/usr/lib/jvm/java-1.5.0-sun/jre
CLASSPATH =. :/usr/lib/jvm/java-1.5.0-sun/lib/tools. jar:/usr/lib/jvm/java-1.5.0-sun/lib/dt. jar
Export PATH
Export JRE_HOME
Export JAVA_HOME
Export CLASSPATH

4. run java-version to check if the version is 1.5.0? Then, java and javac run two commands to check whether any help information is provided.
Related Article

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.