简体   繁体   English

如何使用 vscode 将外部 jar 导入到我的项目中?

[英]How to import external jar into my project with vscode?

I am trying to add external jar into my project with vscode.我正在尝试使用 vscode 将外部 jar 添加到我的项目中。

To manage the classpath with Eclipse, I right-click on my project and select Properties, Java Build Path |为了使用 Eclipse 管理类路径,我右键单击我的项目并选择 Properties、Java Build Path | Libraries.图书馆。

How to do this with vscode?如何使用 vscode 做到这一点?

ms docs gives this tutorial. ms docs 给出了本教程。

在此处输入图片说明

I cannot find LIBPROJ in my vscode.我不能在我的vscode找到LIBPROJ。 Does that need some extension, if yes, what it is?这是否需要一些扩展,如果是,它是什么?

PS: I've already installed Java Extension Pack, Spring Boot Tools , and Spring Boot Dashboard . PS:我已经安装了 Java Extension Pack、 Spring Boot ToolsSpring Boot Dashboard

With installing the "Java Extension Pack" also was installed the "Java Dependency Viewer".安装“Java 扩展包”时还安装了“Java 依赖项查看器”。

So now you can add libraries by editing the .classpath file with custom entries of JARs that may be placed anywhere, for example a lib folder.因此,现在您可以通过编辑 .classpath 文件来添加库,其中包含可放置在任何位置的 JAR 自定义条目,例如 lib 文件夹。 The extensions will automatically load those libraries in the classpath and you should be able to run your code.扩展将自动在类路径中加载这些库,您应该能够运行您的代码。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM