java Intellij中“out”和“.idea”文件夹的作用是什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/44362009/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-03 08:07:53  来源:igfitidea点击:

What is the function of the "out" and ".idea" folder in Intellij?

javaintellij-idea

提问by Illiyan

Can someone clearly explain what is "out" and ".idea" folders in the project structure indicate? Though I'm not a beginner in Java, I need help understanding how all the components in a typical IDE work together. I previously used BlueJ which was very easy to use, but it masked all the background processes which I have difficulty understanding now.

有人可以清楚地解释项目结构中的“out”和“.idea”文件夹表示什么?虽然我不是 Java 的初学者,但我需要帮助来理解典型 IDE 中的所有组件如何协同工作。我之前用过BlueJ,非常好用,但是它屏蔽了我现在很难理解的所有后台进程。

Edit: Sorry I didn't check thoroughly for ".idea" but the "out" folder hasn't been defined in a general sense.

编辑:抱歉,我没有彻底检查“.idea”,但“out”文件夹尚未在一般意义上进行定义。

回答by Opster Elasticsearch Ninja

Read official doc here :- .out :- .out folder intellij

在此处阅读官方文档:- .out :- .out 文件夹 intellij

And .idea :- .idea folder

和 .idea :- .idea 文件夹

In Short all the project specific files goes to .idea folder and it will be recreate if you delete the project.

总之,所有项目特定文件都转到 .idea 文件夹,如果您删除项目,它将重新创建。

And .out folder contains the output of your project when you build/compile it ie contains .class files.

并且 .out 文件夹包含您构建/编译项目时的输出,即包含 .class 文件。

回答by Sarhad Salam

When you use a JetBrains product such as Intellij Idea all the project specific settings are stored in the directory .idea. Here is a link from JetBrains documenting .idea directory: Documentation.

当您使用 Intellij Idea 等 JetBrains 产品时,所有项目特定设置都存储在 .idea 目录中。这是来自 JetBrains 记录 .idea 目录的链接:文档。

As for the out folder it contains all your compiled classes, when you run your program from the IDE, all your classes are compiled in the out directory.

至于 out 文件夹,它包含所有已编译的类,当您从 IDE 运行程序时,所有类都在 out 目录中编译。

回答by Gani

enter image description here

在此处输入图片说明

Lets consider the basic project setup.

让我们考虑基本的项目设置。

  1. Here srcfolder contains all the class files i.e java files.In this example its main.java
  2. outfolder is the project output folder.This folder will be organised hierarchically, which is similar to the src folder.This folder contains the compiled class file.In this example it is main.class out_Reference
  3. ideadirectory that keeps project settings.idea_Reference
  1. 这里src文件夹包含所有的类文件,即 java 文件。在这个例子中它的 main.java
  2. out文件夹是项目的输出文件夹。这个文件夹会分层组织,类似于src文件夹。这个文件夹包含编译好的类文件。在这个例子中是main.class out_Reference
  3. 保存项目设置的想法目录。想法_参考