This document describes how to build a Java (jdk1.6 + atat6.0 + eclipse3.2 + myeclipse5.1) development environment in Linux !! Forget to bring convenience to your development !!
In the Java development environment, JDK must be configured first !!
@ JDK configuration. I configured the latest JDK version, JDK 1.6
1. Download jdk-6u2-linux-i586-rpm.bin from Sun's official website. Website: www.java.sun.com
2. Install jdk1.6: first get the file execution permission: # chmod 755 jdk-6u2-linux-i586-rpm.bin (get the file execution permission)
Then is to compile the file, view the copyright description process: #./jdk-6u2-linux-i586-rpm.bin (compile the file, view the copyright description process)
Next is the installation file process: # rpm-IVH jdk-6u2-linux-i586-rpm (start Installation File)
JDK has been installed. The process of JDK configuration is as follows:
Java_home =/usr/Java/jdk1.6
Export java_home
Path = $ java_home/bin: $ path
Export path
Classpath =.: $ java_home/lib/dt. jar: $ java_home/lib/tools. Jar
Export classpath
Check whether JDK is configured successfully: # Java-version
If: Java version "1.6.014" appears"
Java (TM) 2 Runtime Environment, Standard Edition (build 1.5.0 _ 12-b04)
Java hotspot (TM) Client VM (build 1.5.0 _ 12-b04, mixed mode, sharing)
The JDK installation and configuration have been completed.
Configure tomcat. The latest version of Tomcat is configured. Tomcat6.0
download apache-tomcat-6.0.14.tar.gz first. download URL: www.apache.org
1. install tomcat6.0 first extract the file: apache-tomcat-6.0.14.tar.gz
followed by adding environment variables:
[root @ B root] # vi. bashrc
export java_home =/usr/Java/jdk1.6
export classpath = $ classpath: $ java_home/lib: $ java_home/JRE/lib
export Path = $ java_home/bin: $ java_home/JRE/bin: $ path: $ homr/bin
export catalina_base =/usr/local/Apache-Tomcat-6.0.14
export catalina_home =/usr/local/Apache-Tomcat-6.0.14
next is to make the variable take effect:
# source. bashrc
then verify whether the installation is successful:
[root @ B root] # echo $ java_home
/usr/Java/jdk1.6
[root @ B root] # echo $ catalina_home
/usr /local/Apache-Tomcat-6.0.14
indicates that the installation is successful: then, open the browser and enter: http: // localhost: 8080/. If it appears on the Apache welcome page, it indicates that tomcat has been successfully installed
@ Install eclipse3.2
Download eclipse-sdk-3.2.2-linux-gtk.tar.gz at www.eclipse.org.
First, decompress the file # tar-zxvf eclipse-SDK-3.2.2-linux-gtk.tar.gz
Second, to enable every user to execute eclipse, compile the eclipse. Sh script:
#! /Bin/bash
Export java_home =/usr/Java/jdk1.6
Export classpath =/usr/Java/jdk1.6/lib
/Usr/Romeo/Eclipse/eclipse-VM/usr/Java/jdk1.6/bin/Java-data/home/hyc/workspace &
#-VM parameters are used to specify which JVM is used to execute eclipse
#-The data parameter is used to specify the eclipse data directory.
Copy eclipse. Sh to/usr/local/bin and add permission 755.
# Cp eclipse. sh/usr/local/bin
# Chmod 755/usr/local/bin
Create a desktop icon: (convenient to use)
Usr/local/bin/eclipse. sh, and then find a favorite icon for it (I use/opt/Eclipse/icon. XPM). Then, press "OK". The eclipse shortcut is displayed on the desktop. You can double-click this icon to start eclipse.
Eclipse has been installed successfully .. You can write a small application.Program.
@ Install myeclipse to www.myeclipseide.com to download myeclipse_5_5_1ga_e3_2_installer.bin
First: Get the execution permission: # chmod 755 myeclipse_5_5_1ga_e3_2_2_installer.bin
Then install:./myeclipse_5_5_1ga_e3_2_2_installer.bin.
Select the eclipse installation directory !!
The Java development environment is basically configured !! But to run the program in the environment, you still need to install the database !!