Javaweb Development Environment Configuration (Windows)--top

Source: Internet
Author: User

The configuration of the Javaweb development environment mainly includes the following aspects:

    • The construction of Java running environment;
    • Installation and configuration of the server;
    • The installation and configuration of the database;
    • Selection and installation of the IDE;
Building a Java Operating environment

The general Java Runtime Environment consists of two areas: JDK and JRE, where

    • JDK: Java Development Kit,java Development Kit, required for Java development, generic JDK contains part of the common JRE
    • JRE: Java runtime Environment,java Runtime Environment

1) First download the complete installation package from the official website, double-click to install it;

2) The first is the JDK installation, select the installation directory for installation;

3) Then the installation of the JRE, the same direct installation can be;

4) After the installation is completed, then the environment variable configuration is required, and the environment variable interface is opened first;

5) Here you need to configure 3 environment variables:

    • installation directory for JAVA_HOME:JDK (F:\Java\jdk1.8.0_152)
    • Directory of executable files under PATH:JDK (%java_home%\bin;%java_home%\jre\bin;)
    • Classpath:java the directory where the runtime needs to find the class file (.; %java_home%\lib;)

6) Testing the Java development environment is normal, in general there are two ways:

The first: direct cmd opens the command-line window, running: java-version , the installed Java version information appears as described in the correct configuration:

The second type: Write a Java program under the specified directory, compile it using the Javac command at the command line, and run it using the Java command, so that the desired result of the program is configured correctly;

Server Building and configuration

Tomcat is commonly used as a running container for servlets, and it is useful in javaweb development.

1) Visit the Tomcat official website, download the Tomcat installation file, select Tomcat8 here, mainly because some Ides can not support the TOMCAT9 version;

2) According to the actual situation can download compressed version, or install version, here choose to download the decompression version, download after the completion of a direct decompression to the appropriate directory;

3) Start and close the Tomcat server

Method One:

Execute Startup.bat and Shutdown.bat under the Tomcat directory bin to start and shut down the server

Method Two:

Run the Tomcat8w.exe under the Tomcat directory bin, click "Start" to start the server, after launch, use the browser to access "http://localhost:8080" to see the Tomcat welcome interface stating that the server installation was successful (note: 8080 is the port number , which can be modified in the configuration file)

Click "Stop" to stop the service:

Note: If you start the Tomcat7w.exe prompt "The specified service is not installed", open a Command line window, enter the Tomacat installation directory, and then enter the Bin folder, enter: Service.bat Install

4) Tomcat Common configuration:

To modify the listening HTTP port:

Javaweb Development Environment Configuration (Windows)--top

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.