Java – adds a command call to a UNIX command line application

I am writing a Solaris command line application using java 6 I want to be able to scroll through the history of previous commands using the up and down arrows, as many UNIX tools allow (shell, VIM command mode prompt, etc.)

Is there any standard way to achieve this goal, or do I have to do it myself?

Solution

Yes, use the GNU readLine library

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>