为什么在 ubuntu 上的 java 安装中找不到 javaw?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14331406/
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-10-31 15:53:50  来源:igfitidea点击:

Why javaw is not found on my java installation on ubuntu?

javaubuntu

提问by Isuru Pathirana

I tried to start a program using javaw demoand I was prompted with an error message saying that command 'javaw' is not found. I checked my bin folder and javaw was not found. What could be the reason?

我试图启动一个程序javaw demo,但系统提示我一条错误消息,说找不到命令“javaw”。我检查了我的 bin 文件夹并没有找到 javaw。可能是什么原因?

回答by Stephen C

The javawutility is not available or needed on Linux. Just use javainstead.

javaw实用程序在 Linux 上不可用或不需要。换用就好了java

Explanation:

解释:

  • on Windows, the difference between javaand javawis that javalaunches a new Windows console and javawdoesn't.

  • on Linux, the javacommand does not launch a new console, and hence there is no need for a javawvariant.

  • 在Windows之间的区别java,并javaw是,java推出一个新的Windows控制台,javaw没有。

  • 在 Linux 上,该java命令不会启动新的控制台,因此不需要javaw变体。