简体   繁体   English

在Intellij中添加外部库

[英]Add external library in Intellij

I want to use this external library in my Intellij Maven project. 我想在Intellij Maven项目中使用此外部 I have tried to do it like official described and like often recommended here or here . 我已经尝试像官方描述的那样做,并且经常在这里这里推荐。 But always I try to type ReedSolomon or com.backblaze.erasure.ReedSolomon , ReedSolomon is marked red and Cntrl+b says "Cannot find declaration to go to". 但是我总是尝试键入ReedSolomoncom.backblaze.erasure.ReedSolomonReedSolomon标记为红色,并且Cntrl + b表示“找不到声明去”。 Also Alt+Enter gives me no posibility to import the class. 同样,Alt + Enter也使我无法导入该类。 Other libraries are added and were recognized. 其他库被添加并被识别。

Isn't it possible to use this zip as external library? 不能将此zip用作外部库吗? Do you have any ideas what I can try else? 您有什么想法可以尝试吗?

Thanks! 谢谢!

You have to first unzip the library. 您必须首先解压缩库。 It is not a .jar archive, but a package. 它不是.jar存档,而是一个包。

So you could create a new package in your project: com.backblaze.erasure . 因此,您可以在项目中创建一个新包: com.backblaze.erasure There you copy/paste all .java files from the unzipped directory javareedsolomon\\com\\backblaze\\erasure . 在那里,您从解压缩的目录javareedsolomon\\com\\backblaze\\erasure复制/粘贴所有.java文件。

Hope this helps you :) 希望这对您有所帮助:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM