且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

找不到控制台。如何获取我的JVM的控制台?

更新时间:2023-01-27 20:09:03

您的应用程序将只有一个控制台设备,如果它是从终端启动,没有stdin或stdout重定向。
基本上,函数isatty()必须返回true。 Windows应用程序通常没有控制台,如果他们从explorer启动。您应该从命令提示符(cmd.exe)启动它们。

Your application will only have a console device to open if it was started from a terminal and does not have stdin or stdout redirection. Basically the function isatty() would have to return true. Windows application typically do not have consoles if they are started from explorer. You should start them from the command prompt (cmd.exe).