I have created a new Intellij project. But I can't use the third party jars in my project. I have the jars in a directory structure as follows:repository/commons-logging/commons-logging-1.0.4.jar
repository/commons-lang/commons-lang-2.1.jar
etc.
I want to add them just by pointing to the repository directory, but couldn't find any ways to add them. But when I am using classes or API from that jars, the editor can't resolve the classes. I have tried from Project Structure but can't configure it.
Go to File-> Project Structure-> Libraries and click green "+" to add the directory folder that has the JARs to CLASSPATH. Everything in that folder will be added to CLASSPATH.
In TIBCO Business Studio, click File > New > Project. In the New Project dialog, click the Plug-in Development folder, and then click Plug-in from Existing JAR Archives. Click Next. In the Plug-in from Existing JAR Archives dialog, click Add to add the third-party JAR files.
Go to File-> Project Structure-> Libraries and click green "+" to add the directory folder that has the JARs to CLASSPATH. Everything in that folder will be added to CLASSPATH.
Update:
It's 2018. It's a better idea to use a dependency manager like Maven and externalize your dependencies. Don't add JAR files to your project in a /lib folder anymore.
If, as I just encountered, you happen to have a jar file listed in the Project Structures->Libraries that is not in your classpath, the correct answer can be found by following the link given by @CrazyCoder above: Look here http://www.jetbrains.com/idea/webhelp/configuring-module-dependencies-and-libraries.html
This says that to add the jar file as a module dependency within the Project Structure dialog:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With