首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > java的一个壳的实现

java的一个壳的实现

  • 资源大小:61.68 kB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: java shell

资 源 简 介

Jshell is a simple shell implementation in Java. The project contains some default commands (ie: cat, grep ...) Il allows to pipe the out of a command to an other (like in a real shell!) Configuration of the shell By default no command are present in the shell, you have to add them and start the shell like in the example below : ``` import org.jshell.impl.Cat; import org.jshell.impl.Exit; import org.jshell.impl.Grep; public class Test { public static void main(String[] args) { try { Shell shell = new Shell(); shell.registerCommand(new Grep()); shell.registerCommand(new Cat()); shell.registerCommand(new Exit()); shell.start(); } catch(Exception ex) { ex.printStackTrace(); } } } ```
VIP VIP
  • Mason 40分钟前 成为了本站会员

  • 1小时前 成为了本站会员

  • Half_Punch 1天前 成为了本站会员

  • liqing71718 1天前 成为了本站会员

  • 伟国 1天前 成为了本站会员

  • songy 1天前 成为了本站会员

  • 纯色幽默 1天前 成为了本站会员

  • odd? 1天前 成为了本站会员

  • 52JOY... 1天前 成为了本站会员

  • Sirius 2天前 成为了本站会员

0.169811s