Deploy Java Web develop environment

Source: Internet
Author: User
Build an eclipse + myeclipse Development Environment
From: Skynet
1. Install JDK

First download JDK 5.0 (the download page of JDK 5.0 is:Http://java.sun.com/j2se/1.5.0/download.jsp). Then run the JDK 5.0installer jdk-rj5_0_06-windows-i586-p.exe to keep all options as default during the installation process. Finally, configure the JDK environment variable: right-click "my computer" and choose "properties"> "advanced"> "environment variable (n )".

Create a system variable java_home: C:/program files/Java/jdk1.5.0 _ 06;

New system variable classpath:.; % java_home %/LIB; (Note: The dot number indicates the current directory and cannot be omitted)

In the PATH value of the system variableFrontAdd the following content: % java_home %/bin; (Note: The semicolon here cannot be omitted)

Here, JDK installation is complete.

Next we will test whether JDK is successfully installed:

Copy the following content to notepad:

Public class hellojava
{
Public static void main (string SRG [])
{
System. Out. println ("Hello Java! ");
}
}

Save it as "hellojava. Java" (without quotation marks, the same below) and save it to the root directory of drive D.

Enter the commands marked by the red line in the command line in sequence:

If the content marked in the red box appears, the JDK is successfully installed!

Note: If you want to install integrated development environments such as Eclipse, Borland JBuilder, jcreator, and intellij idea (IDE, integrated development environment) in the future, compile and run a simple helloworld program in the IDE, to ensure that the IDE can identify the JDK location.

  Ii. install Tomcat

The download page of the secret is:

Http://apache.linuxforum.net/tomcat/tomcat-5/v5.0.30/bin/);

Then, unzip jakarta-tomcat-5.0.30.zip to the root directory of drive D:

Finally, configure the Tomcat environment variable: Right-click "my computer" and choose "properties"> "advanced"> "environment variable (n )".

New system variable catalina_home: D:/jakarta-tomcat-5.0.30

In the system variable classpath ValueBackAdd: % catalina_home %/common/LIB;

In the PATH value of the system variable "% java_home %/bin ;",BackAdd the following content: % catalina_home %/bin;

At this point, tomcat installation is complete.

After completing step 1 and step 2, the values of the system variables are as follows:

Java_home: C:/program files/Java/jdk1.5.0 _ 06
Catalina_home: D:/jakarta-tomcat-5.0.30
Classpath:.; % java_home %/LIB; % catalina_home %/common/LIB;
Path: % java_home %/bin; % catalina_home %/bin; % SystemRoot %/system32; % SystemRoot %/system32/WBEM

  3. Install eclipse

First download eclipse-sdk-3.1.2-win32.zip(eclipse-sdk-3.1.2-win32.zip:

Http://www.eclipse.org/downloads/);

Then, unzip eclipse-sdk-3.1.2-win32.zip to the root directory of drive D:

Here, eclipse installation is complete.

  4. Install myeclipse

The first download of the unzip iseworkbenchinstaller_4.1.1ga_e3.1.exe(iseworkbenchinstaller_4.1.1ga_e3.1.exe is:
Http://www.myeclipseide.com/ContentExpress-display-ceid-10.html );

Then install enterpriseworkbenchinstaller_4.1.1ga_e3.1.exe. Note: select the eclipse installation path () when installing to the steps shown. Keep the default values for other options.

After installation, overwrite the features and plugins directories under the myeclipse installation directory to the eclipse installation directory.

Finally, uninstall the installed myeclipse.

To explain the reason for this: Because myeclipse is the Eclipse plug-in, eclipse will automatically recognize these plug-ins as long as the features and plugins directories are overwritten to the eclipse installation directory.

Here, myeclipse is installed.

  5. Crack myeclipse

Run myeclipse4.1.1registration machine myeclipsekeygen.exe, select the version number of myeclipse, enter the registration name, and generate the serial number. (The myeclipse4.x registration machine is:

Http://esoft.g8.com.cn/UploadFiles/2006-5/520753587.rar)

Run eclipse.exe (specify the workspace for the first time), click window ----> preferences ----> myeclipse ----> subscribe ----> enter subscribe, and enter the registration name and the registration code generated by the Registration machine.

Here, myeclipse has been cracked.

  Vi. Specify the JRE and tomcat servers of eclipse + myeclipse

1. Set the JRE of eclipse + myeclipse

In general, eclipse can automatically find JRE, so we don't need to make too many settings.

2. Set the Tomcat server of eclipse + myeclipse

You only need to set the two parts marked in the graph. The rest of the graph is automatically generated.

At this point, our eclipse + myeclipse development environment has been set up!

  7. Create a project to test whether the eclipse + myeclipse development environment has been successfully set up.

1. in eclipse, click "file ----> New ----> Project ", in the displayed "new project" dialog box, click "Web project ----> myeclipse ----> J2EE projects ----> Web Project", and click "Next ", in "project name", enter the project name "test" and click "finish ".

2. Click "test" in the package explorer list on the left of eclipse to expand the project "test. Right-click webroot ----> New ----> JSP to create a JSP page named hello. jsp. Code example (we need to manually add the marked part in the figure, and the remaining part is automatically generated by the system ):

3. Use the same method to create a new JSP file named hello_result.jsp. The Code is as follows:

4. Deploy the project.

Click the deploy button (the red line is the deploy button). In the displayed window, click Add to deploy the test project ().

5. Start the Tomcat server.

As shown in (the button drawn with the red line is the button for starting Tomcat ):

Tomcat startup output information is as follows:

6. Project test running result:

We can go to the eclipse workspace directory to check the code of the test project, or go to the Tomcat webapps directory to check the structure of the tested project after deployment.

 

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.