简体   繁体   English

在 Visual Studio 代码中导入库

[英]importing library in visual studio code

let's say I want to use util4, I will write down in my java file:假设我想使用 util4,我会在我的 java 文件中写下:

import unit4.turtleLib.Turtle;

(I got the jar file in the same folder) (我在同一文件夹中获得了 jar 文件)
I'm running it over visual studio code without maven我在没有 maven 的 Visual Studio 代码上运行它
(if I would want to install maven I would use a different IDE instead) (如果我想安装 maven 我会使用不同的 IDE 代替)
and I can't just put the jar file in the same folder it doesn't work that way, what should I do than?.而且我不能只是将 jar 文件放在同一个文件夹中,这样不起作用,我该怎么办?

1.make sure you hava create a folder named lib inside your project and add your .jar file into it 1.确保您在项目中创建了一个名为lib的文件夹,并将您的.jar文件添加到其中

2.Configure paths in the .classpath like: 2.在.classpath中配置路径,例如:

<classpathentry kind="lib" path="lib/miglayout.jar"/>

you could look at the doucument add jar您可以查看文档添加 jar

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

相关问题 Visual Studio代码导入库 - Visual Studio Code import Library 在 Visual Studio 代码中导入 java 项目并出现构建路径错误。 未绑定的类路径容器:JRE 系统库 jdk-8.0.202.08 - Importing java project in visual studio code and getting build path error. unbound classpath container: JRE System library jdk-8.0.202.08 Visual Studio Code 无法使用库 - Visual Studio Code fails to use a library java 的 Visual Studio 代码未编译并继续加载导入项目 - Visual studio code for java is not compiling and keeps loading importing projects 在Android Studio中导入GraphStream库 - Importing GraphStream library in Android Studio 无法在 Visual Studio Code Java 扩展包中添加 jar 作为库 - Unable to add a jar as a library in Visual Studio Code Java Extension pack 如何将本地jar库添加到visual studio代码中? - How to add local jar library to visual studio code? 在Eclipse中导入库的源代码 - Importing source code of a library in Eclipse 如何在导入 PApplet 时在 Visual Studio 代码上使用 java 处理时使用 object(构造函数)调用 display() 方法 - how to use an object (constructor) to call display() method in processing using java on visual studio code while importing PApplet 将外部库导入 Visual Studio 项目时遇到问题 - Trouble importing external libraries into a Visual Studio project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM