如何清除Java 9 JShell控制台? [英] How to clear Java 9 JShell Console?

查看:80
本文介绍了如何清除Java 9 JShell控制台?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有找到任何命令来清除Java-9 JShell控制台.我还尝试通过该程序清除JShell控制台,但是它也不起作用.

I didn't find any command to clear Java-9 JShell console. I also tried to clear the JShell Console through this program, but it doesn't work either.

import java.io.IOException;

class CLS {
    public static void main(String... arg) throws IOException, InterruptedException {
        new ProcessBuilder("cmd", "/c", "cls").inheritIO().start().waitFor();
    }
}

我认为我们在早期访问中还没有该功能.有人知道吗?

I think we don't have that functionality available yet in the early access. Anyone got an idea?

推荐答案

  • 我在JShell中添加了明确的控制台命令.您可以从尝试工件
  • 下载

    • I have added clear console command in JShell. You can download it from Try artifact
    • ->/cls

      -> /cls

      • 它还支持JShell中的maven.
      • 这篇关于如何清除Java 9 JShell控制台?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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