Intellij Idea 简明教程
Intellij Idea - Running Projects
-
IntelliJ 提供多种创建配置的方法。本章讨论了创建临时和永久配置的选项。还讨论了在其他用户之间共享配置的方法。
IntelliJ provides multiple ways to create configuration. This chapter discusses the options to create temporary, permanent configuration. It also discusses method to share configuration among other users.
Create Temporary Configuration
-
当您运行或调试 Java 类或测试用例时,将创建临时配置。考虑以下步骤来了解其工作原理:——
Temporary configuration is created when you run or debug Java class or test case. Consider the following steps to understand how this works −
-
Create a Java class.
-
Right-click on it and select the Run option.
-
After the first Run, temporary configuration is added to the run menu.
Create Permanent Configuration
-
通过使用 IntelliJ 保存临时配置,可以将其转换为永久配置。要保存配置,请从运行菜单中单击 Save Configuration 选项:——
Temporary configuration can be converted to permanent configuration by saving it with IntelliJ. To save configuration, click on the Save Configuration option from the Run menu −
-
您还可以通过编辑来修改现有配置。
You can also modify the existing configuration by editing it.
Create New Configuration
-
在本节中,我们将了解如何创建新配置。按照以下步骤创建新配置:——
In this section, we will understand how to create new configuration. Follow these steps to create new configuration −
-
Navigate to the Run → Edit Configuration.
-
Click on the Plus button to add new configuration.
-
Select Application from the dropdown list.
-
It will create un-named configuration.
-
Configure it according to your requirements and click on the OK button.
-
This saved configuration will be accessible from the Run menu along with other configurations.
Sharing the Configuration
按照以下步骤与他人共享配置 −
Follow these steps to share configuration with others −
-
Navigate to the Run → Edit Configuration.
-
Select configuration from the left pane and click on the Share checkbox.
-
It will store configuration on disk.
如果使用基于目录的格式,它会将配置单独保存在 runConfiguration 文件夹下的文件中。否则,它会将配置保存在 .ipr 文件中。
If directory based format is used, it will save configuration in separate file under runConfiguration folder. Otherwise, it will store configuration in the .ipr file.