It has been used pycharm and jupyter.
After the discovery opens today IDEA to create a new java project (maven) can not create the corresponding java class files inside the module
solution:
(1) Select File -> Project Structure -> Project Settings -> Modules: can be directly
Sources
Generally used for labeling similar tosrc
this directory can be compiled. Sometimes we do not only projectsrc
directory to be compiled, there are other special directory Maybe we have to be compiled as a directory, you need to make your mark in this directory. OnlySources
this can create a new directory can be compiled Java classes and packages .Tests
It is generally used to label a compilable unit test directory. In maven project structure specification, is a top-level directorysrc
, maven ofsrc
us are not setSources
, but in its subdirectoriesmain
under the directoryjava
catalog, we will be setSources
. The catalog is unit testingsrc - test - java
, here'sjava
catalog we will be set toTests
indicate that the directory is compiled as a unit test directory. The general and we are all behind several configured under maven project, but I'm still here to talk about. From this we can see support for IntelliJ IDEA project maven than thorough.Resources
Generally used to label the resource file directory. In maven project, resource directory is a separate division out of its directory:src - main -resources
Here'sresources
catalog we will be set toResources
indicate that the directory is a resource directory. File in the resource directory will be compiled into lower output directory.Test Resources
一般用于标注单元测试的资源文件目录。在 maven 项目下,单元测试的资源目录是单独划分出来的,其目录为:src - test -resources
,这里的resources
目录我们就会设置为Test Resources
,表示该目录是作为单元测试的资源目录。资源目录下的文件是会被编译到输出目录下的。Excluded
一般用于标注排除目录。被排除的目录不会被 IntelliJ IDEA 创建索引,相当于被 IntelliJ IDEA 废弃,该目录下的代码文件是不具备代码检查和智能提示等常规代码功能。- 通过上面的介绍,我们知道对于非 maven 项目我们只要会设置
src
即可。