Vscode Building a Java development environment

Source: Internet
Author: User

1: Open the Extended view (ctrl+shift+x) in Visual Studio Code, enter the keywords Java, spring separately download the Java Development Plug-in package and the Springboot plug-in package

2: Configuration Parameters Click the Settings button, go to the Settings option, configure user settings (settings Ctrl + +, preferences, file)

{"editor.minimap.enabled": false, "Window.zoomlevel": 0, "Workbench.icontheme": "Vscode-great-icons", "Wo Rkbench.editor.enablePreview ": false," Workbench.editor.enablePreviewFromQuickOpen ": false," Editor.renderindentguides ": false," editor.highlightactiveindentguide ": false," Java.home ":"/usr/local/lib/jdk1.8. 0_172 ", # # #必需" editor.fontsize ":" Editor.lineheight ":" Maven.executable.path ":"/usr/loca L/bin/apache-maven-3.5.4/bin/mvn ", # # #必需   "Java.configuration.maven.userSettings":"/usr/local/bin/apache-maven-3.5.4/conf/settings.xml", # # #必需"MAVEN.TERMINAL.CUSTOMENV": [{       "Environmentvariable": "Java_home", # # #必需"value": "/usr/local/lib/jdk1.8.0_172" # # #必需}], "Terminal.integrated.shell.linux": "/bin/bash", "Java.jdt.ls.vmargs": "-noverify-xmx1g-xx:+use G1gc-xx:+usestringdeduplication "," Explorer.confirmdelete ": false}

3: New project: Open a Command Window (ctrl+shift+p), enter spring, then step by step to create the project

4: After the project is created, modify the main class in the Startup parameters (debug-open Profile->launch.json), and then F5 can run the

{    //use IntelliSense to understand related properties.     //Hover to view the description of an existing property.    //For more information, please visit: https://go.microsoft.com/fwlink/?linkid=830387    "version": "0.2.0",    "configurations": [        {            "type": "java",            "name": "Debug (Launch)-demoapplication<demo> " ,            " request ":" Launch ",            " CWD ":" ${workspacefolder} ",            " console ":" Internalconsole ",            "Stoponentry": false,            "MainClass": "Com.example.demo.DemoApplication",            "args": "",            " ProjectName ":" Demo "        }    ]}

And then F5 can run it.

End

Vscode Building a Java development environment

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.