Eclipse does not show lib directory during Java build path & # 8594; Library editing

I have an Eclipse / Java project (Eclipse 3.5.2) that I am trying to add to a JAR. In the project root directory, I have 3 subdirectories, src , bin and lib , and all 3 subdirectories are present in the Explorer List package. I put the necessary JARs in lib . However, when I go to Project Propertes -> Java Build Path -> Libraries (tab) -> Add JARs and the file dialog box appears, it only displays src and bin in the file collector and not in the lib directory. I assume this is really simple, but can someone tell me why the lib directory is not showing in the file selection dialog?

- roschler

+6
source share
3 answers

After you copy the jar file to your lib folder, you need to update the project in Eclipse (use F5), so Eclipse knows about this.

Then it will show you the lib folder in this dialog box.

Note. In your answer, you are correct that the specified dialog box does not re-read the directory structure, but you do not have enough points - this is not assumed. This is what you have to β€œadd an external jar” for. Moreover, Eclipse is trying to be smart and not show you the jars that you have already added (think of a folder with 50 jars, and you just want to add it). That's why he did not show you the lib folder - she believed that the folder was empty.

+9
source

This will help others. I needed to do File -> Refresh to get Eclipse to view files. Apparently, the file selection dialogs do not re-read the disk structure. I assume that they pull from the image of the main Eclipse file, which must be updated before new files are visible anywhere else in the program.

+3
source

This is how I solved this problem. I created a lib folder in my java project. Then I added some jar to the lib folder.

enter image description here

But it does not appear in my Eclipse IDE. Then I selected my project and right-clicked it. Then updated.

enter image description here

This works for me. I think this will help you.

+2
source

Source: https://habr.com/ru/post/886577/


All Articles