You first have to select either Modulepath or Classpath.
The Modulepath is a very new thing for Java 9 (here you can watch a short video how it can be used). It exists since the Eclipse Oxygen.1a (4.7.1a), October 11, 2017. In case of doubt, I recommend selecting Classpath.
Answer from howlger on Stack OverflowYou first have to select either Modulepath or Classpath.
The Modulepath is a very new thing for Java 9 (here you can watch a short video how it can be used). It exists since the Eclipse Oxygen.1a (4.7.1a), October 11, 2017. In case of doubt, I recommend selecting Classpath.
When this window is open first click on the 'Modulepath' > After that 'Add JARs' option get enabled.
So I am trying to import the standard libraries from https://introcs.cs.princeton.edu/java/stdlib/. I managed to download the JAR file and added it to the JAVA classpath buildpath. However for some reasons I am still not able to import/use the library.
Java Eclipse cant add external jars - Stack Overflow
Click buttons like Add jar and Add External Jar disabled in Eclipse - Stack Overflow
Add external jars into eclipse plugin project - Jazz Forum
java - Eclipse - cant add jar to build path. jar is inside the lib folder of project, but not visible - Stack Overflow
Videos
All of them at first are unclickable when you try to click on them , but rather you right click on the modulepath under the libraries (Build path) , then they will become clickable and then import what you want. That's how its simple.
You have selected the JRE System Library in the panel. Un-select that and you will be able to add external jars.
You can click on the Classpath or Modulepath to move the control away.
Please download the jars from here.
Extract the zip and from the extracted folder select all the necessary jar you need.
For the classes mentioned in the comment. Please add below jars:
1. selenium-api-4.0.0-alpha-3.jar
2. selenium-chrome-driver-4.0.0-alpha-3.jar
NOTE: The versions might vary.
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.
Try to go Window > Preferences > Java > User Libraries and add new user library that point mysql connector.And then use this library to your project.But don't forget to delete your old mysql connector jar in your lib folder.Try this way.
This has nothing to do with compilation: jar's are already compiled.
You only need to add the jar to your project classpath so Eclipse will know to run java with the .jar. You can do this with "Context/Right click menu->Properties > Java Build Path > Libraries" (source). For portability I recommend placing the .jar in a subdirectory of your project. A "lib" folder in your project root (where "bin" and "src" are too) is commonly used.
Also note that to run your program you will need to add the dependency .jar to your java command, but with a little searching you can find out how to include the dependency .jar in your own combined .jar.
You have to put the libraries in /libs folder of your project (if you are using Eclipse you choose "Add JARs.." not "Add external JARs..")