Results 1 to 4 of 4
- 08-11-2009, 11:34 AM #1
Member
- Join Date
- Aug 2009
- Posts
- 2
- Rep Power
- 0
question with command prompt and Runtime.exec()
Hi everyone!
I am using:
Runtime.getRuntime().exec(connect).
To start a MS-DOS application that connects to a server (connect, connects to a server). After doing that, I send info to the server.
The problem is that if:
connect = "whatever to connect";
it gets stuck. However if:
connect = "cmd /c start whatever to connect";
it works. But the command prompt appears and you see what is happening while the computer is getting connected to the server. Do you know why? I would like to connect to the server but without having to show the command prompt.
Thanks in advance
- 08-11-2009, 11:52 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Simply you want to start the process, but the console is hidden is it? Is that console application also coded in Java?
- 08-11-2009, 12:03 PM #3
Member
- Join Date
- Aug 2009
- Posts
- 2
- Rep Power
- 0
Yes, I want to start the process but to hide the console. I don't think that the console application is coded in java, at least I haven't coded it
- 08-11-2009, 12:08 PM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Actually you cannot start a process hidden in Java. Console hiding can be done with the console application. Or else it may possible to start the process as a service.
Similar Threads
-
runtime.exec
By cotede2 in forum Advanced JavaReplies: 3Last Post: 04-17-2009, 05:18 PM -
help with "Runtime.getRuntime().exec(this.command);"
By itaipee in forum New To JavaReplies: 6Last Post: 12-29-2008, 02:47 PM -
help with Runtime.exec()
By Lanfear in forum New To JavaReplies: 18Last Post: 12-16-2008, 11:09 AM -
Tomcat and Runtime.exec
By karine in forum IntroductionsReplies: 1Last Post: 10-03-2008, 08:25 AM -
Runtime.exec()
By hknyo in forum Advanced JavaReplies: 2Last Post: 08-16-2008, 12:40 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks