Correct way to add external jars (lib/*.jar) to an IntelliJ IDEA project

后端 未结 9 1514
时光取名叫无心
时光取名叫无心 2020-11-21 10:20

When creating a new Java project in IntelliJ IDEA, the following directories and files are created:

./projectname.iml
./projectname.ipr
./projectname.iws
./s         


        
9条回答
  •  旧时难觅i
    2020-11-21 10:32

    While I agree with the previous answers, it's important to note how to access the code of those external libraries.

    For example to access a class in the external library, you will want to use the import keyword followed by the external library's name, continued with dot notation until the desired class is reached.

    Look at the image below to see how I import CodeGenerationException class from the quickfixj library.

提交回复
热议问题