简体   繁体   中英

How to refresh external Jars in Eclipse project (Java)?

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.

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

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

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

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

Restarting Eclipse works.

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

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

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

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

在包资源管理器视图中,您可以选择jar并右键单击并刷新。

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..

I think you should check if you open auto build project option.

ProjectAuto Build Project

Everytime I change the method code block , Eclipse would help me build the project to jar.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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