简体   繁体   English

如何在Eclipse中使用java.exe和javaw.exe?

[英]How java.exe and javaw.exe are used in Eclipse?

我知道在命令控制台中使用java.exejavaw.exe ,但它们在Eclipse中是如何使用的?

The Eclipse launcher uses javaw internally to launch Eclipse. Eclipse启动程序在内部使用javaw来启动Eclipse。 You can see the settings in eclipse.ini file in your installation. 您可以在安装中的eclipse.ini文件中查看设置。 This lets you easily identify Eclipse in the list of processes in the task manager instead of seeing another Java process. 这使您可以在任务管理器的进程列表中轻松识别Eclipse,而不是查看另一个Java进程。

When you Run/Debug Java programs inside Eclipse, it defaults to using Java to launch another jvm, but I believe you can set it to use javaw if need. 当您在Eclipse中运行/调试Java程序时,它默认使用Java来启动另一个jvm,但我相信您可以将其设置为在需要时使用javaw Some launchers use javaw by default, I think the Tomcat launcher (in WTP) is one of them. 一些发射器默认使用javaw ,我认为Tomcat启动器(在WTP中)就是其中之一。

Could you please explain a bit what you are trying to do? 你能解释一下你想做什么吗?

If you want to launch a program, using "Run" and "Run as" will do the trick. 如果你想启动一个程序,使用“Run”和“Run as”就可以了。 You can also configure it to use command-line options, environment variables, etc 您还可以将其配置为使用命令行选项,环境变量等

当您单击Run As - > Java Application时,Eclipse应该调用java.exe javaw.exe您还可以在运行设置中选择要使用的exe

AFAIK, Eclipse uses javaw.exe to run; AFAIK,Eclipse使用javaw.exe运行; this is the java process that doesn't use a CMD console window. 这是不使用CMD控制台窗口的java进程。

Java.exe is sometimes launched by Eclipse, to run projects or servers from within the IDE. Eclipse有时会启动Java.exe,以便从IDE中运行项目或服务器。

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

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