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