Build a JAVA Development Environment in Linux (JDK + Eclipse + Tomcat details)

Source: Internet
Author: User
Tags tar unzip
Build a JAVA Development Environment in Linux (JDK + Eclipse + Tomcat in detail) -- Linux general technology-Linux programming and kernel information. The following is a detailed description. In some days when I joined the Red union, I never said anything. I learned a lot about it. I want to share with you some time today. users who have just started Linux, especially those who have switched from Windows to Linux, it is difficult to perform the following operations, and even the Installation File becomes a headache.
I have been learning JAVA for some time, and recently I have the opportunity to come into contact with L Inux,Just think about developing in Linux. In fact, it is not very difficult to use snacks, Google, baidu, etc. The following describes how to build a JAVA Development Environment in Linux:
1. Install JDK in Linux
As for downloading the binary executable file of JDK, we will not talk about it here. You can download it directly on the official website.
(1) I downloaded the JDK Installation File named: jdk-1_5_0_14-linux-i586-rpm.bin, I save it under the/tools directory.
(2) open a terminal and enter the following commands in sequence:
# Run cd/tools to enter the directory where the JDK installation package is located
# Ls-l list the file information in this directory to see if the JDK installation file has executable permissions (usually not)
# Chmod 755 if the jdk-1_5_0_14-linux-i586-rpm.bin has no execution permission, execute this step.
#./Jdk-1_5_0_14-linux-i586-rpm.bin run JDK Installation File
# Ls-l view/tools again and find an additional JDK rpm package
# Rpm-ivh jdk *. rpm install JDK's rpm package
If JDK has been installed before, you can try to install it forcibly:
# Rpm-ivh -- force jdk *. rpm
# After cd/usr/java is successfully installed, you can see a java file under the/usr File
(3) environment variable configuration
Anyone who has learned JAVA in windows knows that you need to configure environment variables, which is no exception in LINUX.
To configure the environment variable in LINUX, modify the file/etc/profile as follows:
# Vi/etc/profile open the file in the vi editor and edit it (add environment variables)
Add the following code at the end of the file:
JAVA_HOME =/usr/java/jdk1.5.0-14 (JDK version depends on your own installation Version)
Export JAVA_HOME
PATH = $ JAVA_HOME/bin: $ PATH
Export PATH
CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
Export CLASSPATH
By now, JDK is fully installed. You can run # java or # javac on the terminal to test whether the installation is successful. the next step is the installation of java ide. Here we will introduce the installation of Eclipse.
2. Install Eclipse in Linux
Anyone familiar with Eclipse knows that it is a free-of-Installation Software and can be used normally only after being decompressed (the premise is that JDK has been correctly installed ). similarly, here does not introduce its download, go to the official (http://www.eclipse.org/) under its installation package.
The Eclipse package I downloaded is: eclipse-java-europa-fall2-linux-gtk.tar.gz, which is also saved under/tools.
Run the following command:
# Gunzip eclipse-java-europa-fall2-linux-gtk.tar.gz
After executing the above command, you will find a: eclipse-java-europa-fall2-linux-gtk.tar package.
# Tar-xvf eclipse-java-europa-fall2-linux-gtk.tar unzip Installation
Now, the installation of Eclipse is complete. You will find it in/tools/eclipse.
3. Tomcat installation
Download the TOMCAT installation package at www.apache.org, download the package is: apache-tomcat-5.5.26.tar.gz, also put it under the/tools directory, and then execute the command on the terminal:
# Tar-zxvf apache-tomcat-5.5.26.tar.gz
In this way, an apache-tomcat-5.5.26 folder is added to the/tools directory, so that TOMCAT is installed. Next, you need to set the environment variable.
# Vi/etc/profile open the file in the vi editor and edit it (add environment variables)
Add the following code at the end of the file:
CATALINA_HOME =/tools/apache-tomcat-5.5.26 (the tomcat version depends on your installation Version)
Export CATALINA_HOME
Save and exit.
Now TOMCAT installation is complete. Test whether the installation is successfulRun the following command on the terminal:
#/Tools/tomcat */bin/startup. sh enable TOMCAT server
Open the browser and enter http: // localhost: 8080. If you see the cute kitten, it will prove that the installation is successful!


Each of the above steps is summarized by yourself during the setup process. The tests are successful!
Now, even if the JAVA development environment has been fully established, you can try it.

[ This post was last edited by lyq617617]
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.