简体   繁体   English

Java构建路径中缺少.jar,路径中存在回退

[英]Missing .jar in Java Build Path with backslaches in path

I am adding new version of TestNG library. 我正在添加新版本的TestNG库。 So I downloaded new testng-6.13.1.jar to the folder .../tools/testng , and trying to add reference to it the same way I did for previous version. 因此,我将新的testng-6.13.1.jar下载到.../tools/testng文件夹中,并尝试像以前版本一样添加对它的引用。 But new jar is added with backslashes in path and is defined as (missing) by the IDE: 但是新的jar在路径中添加了反斜杠,并被IDE定义为(missing)

缺少新版本的testng

Why is it so? 为什么会这样呢?

如果jar位于工作空间中的某个位置,请使用Add JARs ...在这种情况下打开,它将使用相对路径,但是如果jar位于工作空间之外,则使用Add External JARs ...选项,它将指向绝对jar文件。

As .jar file was inside of the project, IDE could not see it untill I did refresh in Package Explorer : 由于.jar文件位于项目内部,因此直到我在Package Explorer刷新后,IDE才能看到它:

需要在资源管理器中刷新

So simply right click on the destination folder of library and select Refresh or press F5. 因此,只需右键单击库的目标文件夹,然后选择“ Refresh或按F5。

在此处输入图片说明

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

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