Logo Questions Linux Laravel Mysql Ubuntu Git Menu

Eclipse - cant add jar to build path. jar is inside the lib folder of project, but not visible

I manually copied the my sql connector jar to lib folder of my sql jdbc project. I had some old jars already in that folder and which were also easily added to build path before. Now, I forgot how i did it and i don't see that the lib folder when i try to add the jar to build path. How do it ? I want my jar to be a part of my project and not lying in some random folder.

like image 566
sweet dreams Avatar asked Jul 25 '12 00:07

sweet dreams

People also ask

Why can't I add external JARs in Eclipse?

However, the 'add external jars' button is greyed out, implying that i am not allowed to use it. Can anyone help? If your project builds with Java 9+ make sure you've selected Classpath (as shown here). You should also be able to add the JAR with right-click on the project > Build Path > Add External Archives....

Where is lib folder in Eclipse?

To get started, open the "Preferences" window in Eclipse. Navigate to "Java » Build Path » User Libraries" on the left-hand side and click the "New" button. Enter the library name and click the "OK" button (leave the "System library" checkbox alone).

1 Answers

Paste the jar directly inside eclipse using the project explorer to your desired folder and then try to "Add Jar" from Build Path->Configure Build Path->Libraries.

like image 80
user1694733 Avatar answered Oct 17 '22 23:10