Install Java JDK on Ubuntu and set environment variables of ant JUnit Tomcat

Source: Internet
Author: User
Installing JDK in Ubuntu is simple.

$ Sudo apt-Get install sun-java6-jre sun-java6-jdk
Automatic Installation of JRE and JDK

Download ant, JUnit, and unzip tomcat to your desired location, under my/home/ycpeng/Java directory

Edit/etc/profile

$ Sudo gedit/etc/profile

Add the following content and change the file directory to your own

# Set Java environment
Ant_home =/home/ycpeng/Java/Apache-ant-1.7.0
Catalina_home =/home/ycpeng/Java/apache-tomcat-6.0.16
Classpath =.: $ java_home/lib/dt. jar: $ java_home/lib/tools. jar: % ant_home %/lib: % junit_home %/junit-4.4.jar: % junit_home %
Java_home =/usr/lib/JVM/Java-6-sun-1.6.0.06
Junit_home =/home/ycpeng/Java/junit4.4
Path = $ path: % ant_home %/bin
Export ant_home catalina_home classpath java_home junit_home path

Log out once to take effect

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.