简体   繁体   English

Eclipse控制台头中'2'的含义是什么:MyApp(2)[Java Application]

[英]What is the meaning of the '2' in the Eclipse console header: MyApp (2) [Java Application]

I'm writing a Swing application in Eclipse, and I just noticed that, after I launch the application, the Eclipse console header has a '2' in parentheses, as in: 我正在Eclipse中编写一个Swing应用程序,我只是注意到,在我启动应用程序之后,Eclipse控制台标题在括号中有一个'2',如:

MyApp (2) [Java Application] C:\\Program Files\\Java ... MyApp(2)[Java应用程序] C:\\ Program Files \\ Java ...

Whenever I've used Eclipse before, I only noticed the number '1' there. 每当我以前使用Eclipse时,我只注意到数字'1'。

Does anyone know the meaning of these numbers? 有谁知道这些数字的含义?

As by default the action of clicking on close will not exit that java process, hence even you closed that java swing application, the java process still running. 默认情况下,单击close的操作不会退出该java进程,因此即使您closed了java swing应用程序,java进程仍在运行。
That is the reason of 2 appear on your eclipse since there exists 2 java swing processes on your machine. 这就是你的eclipse上出现2的原因,因为你的机器上存在2个java swing进程。
To quit that the disposed process, you need to click on the red square button on terminal tab. 要退出已处理的进程,您需要单击terminal选项卡上的红色方块按钮。
Or I will suggest you to set default Close Action with exit . 或者我建议您使用exit设置默认关闭操作。

This is the name of the Run Configuration for the application. 这是应用程序的Run Configuration的名称。 Eclipse makes up a name for this configuration each time you run a new program, if there is already an application with the app name it adds (1), (2) ... to the name. 每次运行新程序时,Eclipse都会为此配置组成一个名称,如果已经有一个应用程序名称的应用程序,它会在名称中添加(1),(2)....

Open Run > Run Configurations (or Debug Configurations ) and you will see the list of configurations that Eclipse has. 打开Run > Run Configurations (或“ Debug Configurations ),您将看到Eclipse具有的配置列表。 You can edit the names if you want or delete out of date configurations. 如果要删除或删除过期配置,可以编辑名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM