IntelliJ 14透明控制台/终端 [英] IntelliJ 14 clear console / terminal

查看:57
本文介绍了IntelliJ 14透明控制台/终端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置使用cmd作为终端,但是当我输入cls或使用 Runtime.getRuntime().exec("cls")时,我得到一个IOException,提示无法运行程序"cls"系统找不到指定的文件.

I have it setup to use cmd as the terminal but when I type cls or use Runtime.getRuntime().exec("cls") I get a IOException saying Cannot run program "cls" the system cannot find the file specified.

有什么方法可以将本地终端命令保留在IntelliJ的嵌入式终端中?

Is there any way to keep native terminal commands within the embedded terminal in IntelliJ?

推荐答案

方法 Runtime.getRuntime().exec(此处的某些命令")如果发生I/O错误,将抛出IOException,而未知命令可能会导致这种情况的发生.
这就是说 cls 命令根本没有在 PATH 环境中定义.

Method Runtime.getRuntime().exec("some command here") will throw IOException if an I/O error occurs, and unknown command could cause the occurrence of this situation.
that's to say cls command was not defined in the PATH environment at all.

这篇关于IntelliJ 14透明控制台/终端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆