且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将 Jar 文件添加到 IntellijIdea 类路径

更新时间:2021-07-12 01:47:18

转到 File-> Project Structure-> Libraries 并单击绿色+"将包含 JAR 的目录文件夹添加到 CLASSPATH.该文件夹中的所有内容都将添加到 CLASSPATH.

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.

更新:

现在是 2018 年.***使用像 Maven 这样的依赖项管理器并外部化您的依赖项.不要再将 JAR 文件添加到/lib 文件夹中的项目中.

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.