vscode builds java development environment
Environment: The system needs to install jdk1.8, configure the environment variable JAVA_HOME
Open vscode, install java related plug-ins
Language support for Java ™ for Visual Studio Code
Java Extension Pack
Debugger for Java
Java Test Runner
After the above plug-ins are installed, you can start java development.
Personally recommended plug-in
Eclipse Keymap for Visual Studio Code
. (eclipse shortcut keys, favorite of eclipse users)
Lombok Annotations Support for VS Code
. (Simplified POJO, very pleasant surprise)
Develop basic configuration
Common configuration items: File->Preferences->Settings
1 , maven configuration (if maven is installed locally)
"java.configuration.maven.userSettings": "/home/luokai/maven/apache-maven-3.3.9/conf/settings.xml"
It is recommended to use maven Ali warehouse: add ## in settings.xml #
<mirrors> <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/repositories/central/</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors>2. Global search ignores folders, and you often need to ignore target files when searching for files.
"search.exclude": { "**/node_modules": true, "**/bower_components": true, "**/target": true, "**/logs": true }3. Junit testing, there are problems with the Java Test Runner plug-in running multi-module project tests
GitHub issues have now been resolved: ), in version 0.7.1
recommend a cumbersome way: rely on maven tasks-> configure tasks in the tasks array Add the following configuration:
"tasks": [ { "label": "test:HelloWorld", "type": "shell", "command": "mvn -Dtest=HelloWorldTest#testHelloWorld test", "group": "test" },Execute test:command: Run the specified unit test, HelloWorldTest.testHelloWorld() methodTask->Run taskSelect just added The test case works perfectly. 4. Use tomcat to debug web projects(1) Install the Tomcat for Java plug-in(2) Click the right number of TOMCAT SERVERS in the sidebar and select the locally installed tomcat (3) Select the war package to run.
PS: Pay attention to building the latest war package before debugging
Tips:Cancel clicking to open the file to cover the navigation bar:File->Preferences->Settings, add "workbench.editor.enablePreview": false,Related article tutorial recommendations:
The above is the detailed content of vscode builds java development environment. For more information, please follow other related articles on the PHP Chinese website!

The difference between VisualStudioProfessional and Enterprise is in the functionality and target user groups. The Professional version is suitable for professional developers and provides functions such as code analysis; the Enterprise version is for large teams and has added advanced tools such as test management.

VisualStudio is suitable for large projects, VSCode is suitable for projects of all sizes. 1. VisualStudio provides comprehensive IDE functions, supports multiple languages, integrated debugging and testing tools. 2.VSCode is a lightweight editor that supports multiple languages through extension, has a simple interface and fast startup.

VisualStudio is a powerful IDE developed by Microsoft, supporting multiple programming languages and platforms. Its core advantages include: 1. Intelligent code prompts and debugging functions, 2. Integrated development, debugging, testing and version control, 3. Extended functions through plug-ins, 4. Provide performance optimization and best practice tools to help developers improve efficiency and code quality.

The differences in pricing, licensing and availability of VisualStudio and VSCode are as follows: 1. Pricing: VSCode is completely free, while VisualStudio offers free community and paid enterprise versions. 2. License: VSCode uses a flexible MIT license, and the license of VisualStudio varies according to the version. 3. Usability: VSCode is supported across platforms, while VisualStudio performs best on Windows.

VisualStudio supports the entire process from code writing to production deployment. 1) Code writing: Provides intelligent code completion and reconstruction functions. 2) Debugging and testing: Integrate powerful debugging tools and unit testing framework. 3) Version control: seamlessly integrate with Git to simplify code management. 4) Deployment and Release: Supports multiple deployment options to simplify the application release process.

VisualStudio offers three license types: Community, Professional and Enterprise. The Community Edition is free, suitable for individual developers and small teams; the Professional Edition is annually subscribed, suitable for professional developers who need more functions; the Enterprise Edition is the highest price, suitable for large teams and enterprises. When selecting a license, project size, budget and teamwork needs should be considered.

VisualStudio is suitable for large-scale project development, while VSCode is suitable for projects of all sizes. 1. VisualStudio provides comprehensive development tools, such as integrated debugger, version control and testing tools. 2.VSCode is known for its scalability, cross-platform and fast launch, and is suitable for fast editing and small project development.

VisualStudio is suitable for large projects and Windows development, while VSCode is suitable for cross-platform and small projects. 1. VisualStudio provides a full-featured IDE, supports .NET framework and powerful debugging tools. 2.VSCode is a lightweight editor that emphasizes flexibility and extensibility, and is suitable for various development scenarios.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Dreamweaver CS6
Visual web development tools

WebStorm Mac version
Useful JavaScript development tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),
