'Java Project for vscode doesn't works fine

Whenever I create a new maven project in vscode, the Java Project extension doesn't update as the file explorer does, so I have to manually clean the workspace caches to make it synchronized. Also, the only file category I could add in Java Project view is the .class files, so I have to quire with the explorer. In some cases, suppose I need to add the same file in two or more nested folder like src and target, which is confusing, it' s never the case in eclipse and other refined editors for java, is there a way to solve these two problems?



Solution 1:[1]

I will publish my operation steps in the answer. You can also refer to the official documents for more information on project management

  1. Creat java project

enter image description here

  1. Creat a new floder to save Maven

enter image description here

  1. Vscode automatically generates Maven project and workspace environment

enter image description here

There is no need to empty the workspace. Of course, if you want to create a project in the original directory, it may cause similar problems.

For your second question, I think java project only manages Java classes. If you want to put other file types, why not use file explorer.

Java project has its own things to do

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 MingJie-MSFT