• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Can I get command-line edition on a Socket stream?

Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Many times I want a quick back door into a Java application I've written.  For various reasons, using JConsole isn't really an option, so I have a simple Console class that listens to connection attempts on a configured IP port, and then I use telnet to talk to the Console.  The Console uses a Scanner to read the Socket's inputStream.  Now, when I use Scanner with System.in, I automatically get simple command-line editing; I can backspace to delete characters and re-enter them.  When I use the Scanner to read the Socket's inputStream, I get no command-line editing.  Who supplies the command line editing feature?  Is there any way to get it when using a Socket inputStream?
grapes are vegan food pellets. Eat this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!