如何在Eclipse项目(Java)中刷新外部Jars?

时间:2022-03-15 10:36:07

I have a Java project in Eclipse which includes a couple of external jar files. These external jar files are being rebuilt through a different process (not Eclipse, Ant). Those changes are not being reflected on the Eclipse project even if I refresh the project. If I close the project and reopen, it works.

我在Eclipse中有一个Java项目,它包含几个外部jar文件。这些外部jar文件正在通过不同的进程(而不是Eclipse,Ant)进行重建。即使我刷新项目,这些更改也没有反映在Eclipse项目中。如果我关闭项目并重新打开,它就可以工作。

Any suggestions on how I could expedite the project without having to close and reopen? Thanks.

关于如何在不必关闭和重新打开的情况下加快项目的任何建议?谢谢。

5 个解决方案

#1


4  

Try right click on the project and select refresh. If that does not work, go to the Project menu, clean, and check your project.

尝试右键单击项目并选择刷新。如果这不起作用,请转到“项目”菜单,清理并检查项目。

#2


2  

In the package explorer view, you can select the jar and do right click and refresh.

在包浏览器视图中,您可以选择jar并右键单击并刷新。

Is not available in Eclipse Version: 3.6.1, Build id: M20100909-0800. I think that version's current. A reportable bug IMHO.

在Eclipse版本中不可用:3.6.1,构建ID:M20100909-0800。我认为那个版本是最新的。一个可报告的错误恕我直言。

Restarting Eclipse works.

重启Eclipse工作。

#3


1  

In the package explorer view, you can select the jar and do right click and refresh.

在包浏览器视图中,您可以选择jar并右键单击并刷新。

#4


1  

If the above answers did not work for you and this jar is on your build path. Do following steps :

如果上面的答案对你不起作用,那么这个jar就在你的构建路径上。执行以下步骤:

1- remove the jar from the build path(right clicking the jar -> Build Path -> Remove from build path)

1-从构建路径中删除jar(右键单击jar - > Build Path - >从构建路径中删除)

2- add the jar to the build path(right clicking the jar -> Build Path -> Add to build path)

2-将jar添加到构建路径(右键单击jar - > Build Path - > Add to build path)

This worked for me and is much easier than restarting Eclipse.

这对我有用,并且比重启Eclipse要容易得多。

#5


0  

If refreshing the project, cleaning the project, refreshing referenced jar (F5) does not work, it might be Maven dependency still referencing old version. If your project uses Maven, remove this jar temporarily from Maven Dependencies list (you can update it later). It worked for me..

如果刷新项目,清理项目,刷新引用的jar(F5)不起作用,可能是Maven依赖仍然引用旧版本。如果您的项目使用Maven,请暂时从Maven Dependencies列表中删除此jar(您可以稍后更新)。它对我有用..

#1


4  

Try right click on the project and select refresh. If that does not work, go to the Project menu, clean, and check your project.

尝试右键单击项目并选择刷新。如果这不起作用,请转到“项目”菜单,清理并检查项目。

#2


2  

In the package explorer view, you can select the jar and do right click and refresh.

在包浏览器视图中,您可以选择jar并右键单击并刷新。

Is not available in Eclipse Version: 3.6.1, Build id: M20100909-0800. I think that version's current. A reportable bug IMHO.

在Eclipse版本中不可用:3.6.1,构建ID:M20100909-0800。我认为那个版本是最新的。一个可报告的错误恕我直言。

Restarting Eclipse works.

重启Eclipse工作。

#3


1  

In the package explorer view, you can select the jar and do right click and refresh.

在包浏览器视图中,您可以选择jar并右键单击并刷新。

#4


1  

If the above answers did not work for you and this jar is on your build path. Do following steps :

如果上面的答案对你不起作用,那么这个jar就在你的构建路径上。执行以下步骤:

1- remove the jar from the build path(right clicking the jar -> Build Path -> Remove from build path)

1-从构建路径中删除jar(右键单击jar - > Build Path - >从构建路径中删除)

2- add the jar to the build path(right clicking the jar -> Build Path -> Add to build path)

2-将jar添加到构建路径(右键单击jar - > Build Path - > Add to build path)

This worked for me and is much easier than restarting Eclipse.

这对我有用,并且比重启Eclipse要容易得多。

#5


0  

If refreshing the project, cleaning the project, refreshing referenced jar (F5) does not work, it might be Maven dependency still referencing old version. If your project uses Maven, remove this jar temporarily from Maven Dependencies list (you can update it later). It worked for me..

如果刷新项目,清理项目,刷新引用的jar(F5)不起作用,可能是Maven依赖仍然引用旧版本。如果您的项目使用Maven,请暂时从Maven Dependencies列表中删除此jar(您可以稍后更新)。它对我有用..