Forums Register Login

Starting an exec

+Pie Number of slices to send: Send
Is it possible to start a Command Prompt using Runtime.exec()

I know its possible to start applications running and i know you can use cmd /c to start a command terminal inside of java.

I would quite like to actually start a terminal up, so that if a user was watching the machine a terminal would appear for them. Any ideas?

Tom
+Pie Number of slices to send: Send
What kind of event would trigger the terminal popup? There has to be some kind of input so the system knows when to do this...
+Pie Number of slices to send: Send
Well, I think you can. Of cource you can just start up "cmd" and then you can set a printwriter output stream to that window and type out what you want. I have seen that done before, but I never done it myself. You could always cheat and use the Robot class though .
+Pie Number of slices to send: Send
Ive discovered that cmd /c start /D<dir> <command> is a way of doing it. It may be necessary if you wish to close the existing terminal and start a new one.
Cheers

Tom
You didn't tell me he was so big. Unlike this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 648 times.
Similar Threads
Cmd alternative
TextPad Install
java on os x (very beginning)
oracle on unix
Installing JDK
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 07:23:17.