Java course 1: Build eclipse + myeclipse + Tomcat

Source: Internet
Author: User

Cy163 Note: it is best to use the installation version of Tomcat, so you do not need to add and set Windows system variables. In addition, the installation version of Tomcat provides a shortcut to start and close tomcat. In non-installation versions, you can only enter shutdown. BAT and startup. bat in the DOS command line to start and close tomcat.

Installation version

Http://www.eu.apache.org/dist/tomcat/tomcat-6/v6.0.18/bin/ (installation)

 

Java Standard Edition SDK.

Https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewFilteredProducts-SingleVariationTypeFilter

Jdk-6u13-windows-i586-p.exe

------------------------------------------------

 

Reprinted in this articleHttp://blog.csdn.net/jojoaric/archive/2006/10/17/1338763.aspxXin's column

The version of my learning experiment is later than this article:

JDK: 1.6.0.2

Tomcat 5.5

My eclipse 7.1

 

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 JDK 5.0 to installProgramJdk-1_5_0_06-windows-i586-p.exe, keep all options default during installation; finally configure JDK environment variables: right-click "my computer" and choose "properties"> "advanced"> "environment variable (n )".

New system variableJava_home: C: \ Program Files \ Java \ jdk1.5.0 _ 06;

New system variableClasspath:.; % Java_home % \ Lib; (Note: The dot number indicates the current directory and cannot be omitted)

In System VariablesPathOfFrontAdd 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/download.php? File =/Eclipse/downloads/drops/R-3.1.2-200601181600/eclipse-SDK-3.1.2-win32.zip);

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.CodeFor example, you 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:

 

you 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 test project after deployment.

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.