FAQ: Java Console Handling
June 14th, 2005
No comments
As it is one of the FAQs on every Java newsgroup or Java Mailinglists: “How to handle console?”
I came across a nice library that supports console operations on Windows, Linux and Mac OS: JLine.
Check it out, if you really need to work with the console on the mentioned platforms. The libarary works using native features, but I find the handling quite nice: the required DLL for Windows for instance is dynamically extracted from the JAR and loaded, so there is no need for a special installation.
JLine does not provide curses features at the moment, but it is a good approach if you need to read a password from standard in.
I am Software Engineer and partly self-employed. I am currently focused around C++ and Java on Linux, but previously used to develop mainly for Windows on the Microsoft .NET platform, and sometimes Python and PHP for web applications. I consider myself being a Linux enthusiast. (