Home > Development Tools > VSCode > body text

How vscode runs JavaWeb projects

王林
Release: 2019-12-30 10:52:40
Original
17672 people have browsed it

How vscode runs JavaWeb projects

Prerequisite: The system has a Java environment installed and environment variables configured.

1. Install the vscode plug-in. After the installation is completed, you need to restart vscode.

Regarding the java plug-in, when you open the java file with vscode, you will be prompted to install it.

How vscode runs JavaWeb projects

2. Use vscode to open (or manually create) the Java web project

How vscode runs JavaWeb projects

3. Use the command line to package the project into war. Selecting the first command under the project file will generate a war package named after the project folder

How vscode runs JavaWeb projects

4. Add the Tomcat service and select Tomcat Server in the sidebar. Click Add, select your own Tomcat directory

How vscode runs JavaWeb projects

##5, run the service and project, right-click the generated war package, and select Run on Tomcat Server

How vscode runs JavaWeb projects

6. To view the project, enter

http://localhost:8080 directly in the browser or right-click the published project open in Browser to view the project running results.

How vscode runs JavaWeb projects

Note: Remember to build the latest war package before debugging.

Recommended related articles and tutorials:

vscode tutorial

The above is the detailed content of How vscode runs JavaWeb projects. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template