| Author |
dos prompt + java progaram + problem
|
Sarran Vidyakumar
Greenhorn
Joined: Mar 26, 2003
Posts: 28
|
|
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
Joined: Jul 30, 2003
Posts: 804
|
|
|
What if you wrote to a text file instead of the DOS window? Then you could do whatever you want with the text.
|
Give a man a fish, he'll eat for one day. <br />Teach a man to fish, he'll drink all your beer.<br /> <br />Cheers,<br /> <br />Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24041
|
|
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.
|
[Jess in Action][AskingGoodQuestions]
|
 |
Nicholas Cheung
Ranch Hand
Joined: Nov 07, 2003
Posts: 4982
|
|
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
|
SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
|
 |
Layne Lund
Ranch Hand
Joined: Dec 06, 2001
Posts: 3061
|
|
Originally posted by Ernest Friedman-Hill: There is indeed a fix. It's called "Linux".
Here! Here!
|
Java API Documentation
The Java Tutorial
|
 |
 |
|
|
subject: dos prompt + java progaram + problem
|
|
|