idea file can not be created javaclass

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 to  src this directory can be compiled. Sometimes we do not only project  src 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. Only  Sources 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 directory  src, maven of  src us are not set  Sources , but in its subdirectories  main under the directory  java catalog, we will be set  Sources. The catalog is unit testing  src - test - java, here's  java catalog we will be set to  Testsindicate 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 -resourcesHere's  resources catalog we will be set to  Resourcesindicate 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 即可。

 

 

 

Guess you like

Origin www.cnblogs.com/wqbin/p/11291614.html
Recommended