• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dos prompt + java progaram + problem

 
Sarran Vidyakumar
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey guys:
i m running a java program (jms client) that i start using a .exe batch file. The program opens in a dos-command prompt and prints on the window messages it receives..the problem now is that whenever we have some text highlighted on the dos window the whole java program freezes...and again when we hit enter(disabling/removing the white space) all messages get printed out at once..so when we have highlighted text the whole dos window freezes & waits for a enter to flush all output...is there a workaround..this is not a java code problem..but is inherent in all dos windows..thanks in advance for help
 
Jeff Bosch
Ranch Hand
Posts: 805
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What if you wrote to a text file instead of the DOS window? Then you could do whatever you want with the text.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is indeed a fix. It's called "Linux".

Seriously: there used to be, and probably still are, alternative Windows command shells available as freeware/shareware; search around, see what you can find. Alternatively, you can change your program to use a graphical console (i.e., a JTextArea in a JFrame) instead of writing to System.out.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What if you wrote to a text file instead of the DOS window? Then you could do whatever you want with the text.

I agree with Jeff, you might either write the messages to the LOG file in the file system, or create a GUI console for message display, instead of making use of the standard output.

Nick
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ernest Friedman-Hill:
There is indeed a fix. It's called "Linux".

Here! Here!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic