How to add library files to vscode?
Problem: Because idea is associated with the jar library through the configuration in .idea/libbraries/xxx.xml.
Directly place the java project in idea into vscode. Because vscode uses its own configuration file to associate the jar library, it cannot run.
Solution:
Because vscode needs four configuration files it needs to run a java project: .setting, .vscode, .project, .classpath, and others The java project created by the project definitely does not have the configuration it needs set for vscode. Therefore, for convenience, use the vscode tool to first create an empty java project, and create it with your own project name (you don’t need to use it).
Shortcut key ctrl shift p to open the command and enter Java: Create Java Project, and then enter the project name to get the configuration file required for an empty project, and delete the redundant main class.
Put .setting, .vscode, .project, .classpath files into your own project.
Open the .classpath file, add the line
Note: If the modification to .classpath does not take effect immediately, just restart vscode.
Recommended learning: vscode tutorial
The above is the detailed content of How to add library files to vscode. For more information, please follow other related articles on the PHP Chinese website!