Adding class/jar file to IntelliJ IDEA

£可爱£侵袭症+ 提交于 2021-01-07 03:06:52

问题


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

I tried

  • Adding .class to JDK lib/ext directory

  • Adding it to IntelliJ lib directory


回答1:


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




回答2:


Add your jar here: File | Project Structure | Global Libraries



来源:https://stackoverflow.com/questions/54495522/adding-class-jar-file-to-intellij-idea

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!