将类/jar文件添加到IntelliJ IDEA [英] Adding class/jar file to IntelliJ IDEA

查看:153
本文介绍了将类/jar文件添加到IntelliJ IDEA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将.cl​​ass/.jar文件添加到InelliJ IDEA,以便将其添加到创建的每个项目中.

Is there any way to add .class/.jar file to InelliJ IDEA, so that It will be added to every project created.

我尝试过

  • 将.class添加到JDK lib/ext目录

  • Adding .class to JDK lib/ext directory

将其添加到IntelliJ lib目录

Adding it to IntelliJ lib directory

推荐答案

您可以在文件"->项目结构"->全局库"中创建一个新库.然后将您的类/罐子添加到该库中.

You can create a new library in File -> Project Structure -> Global Libraries. Then add your classes/jars to that library.

此库不会自动添加到您创建的每个项目中.因为,在很多情况下可能并不需要这样做.

This library will NOT be automatically added to every project you create. Because, this may not be desired in many cases.

您必须手动将库添加到项目中.您可以在以下位置进行操作:文件->项目结构->模块->依赖项

You have to add the library to projects manually. You can do it in: File -> Project Structure -> Modules -> Dependencies

这篇关于将类/jar文件添加到IntelliJ IDEA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆