简体   繁体   English

如何在我的程序 vscode 中加载 jar 文件?

[英]How to load a jar file in my program vscode?

Hello Stackoverflow.你好 Stackoverflow。 I cannot use these .jar files in my code...I need those files to manage a local database managed by derby.我不能在我的代码中使用这些 .jar 文件...我需要这些文件来管理由 derby 管理的本地数据库。

I tried to add the lib folder to the classpath, but it didn't work.我尝试将 lib 文件夹添加到类路径,但没有用。

When I try to '''org.apache.derby.jdbc.EmbeddedDriver''' it does not find it.当我尝试 '''org.apache.derby.jdbc.EmbeddedDriver''' 它没有找到它。 I use VSCode as my main editor.我使用 VSCode 作为我的主要编辑器。 I cannot change VSCode, but for the future, I will consider other options.我无法更改 VSCode,但对于未来,我会考虑其他选项。 I leave this screenshot here regarding my folder structure.关于我的文件夹结构,我将这个截图留在这里。 在此处输入图片说明

try to define the path like this in your .classpath file :尝试在您的.classpath文件中定义这样的路径:

<classpathentry kind="lib" path="lib/derby.jar"/> 
<classpathentry kind="lib" path="lib/derbyclient.jar"/>

refer to add jar参考添加jar

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

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