Results 1 to 1 of 1
- 07-13-2009, 05:22 PM #1
Member
- Join Date
- Jan 2009
- Posts
- 1
- Rep Power
- 0
Running system comman with special symbols using Runtime.exec()
Hello,
I want to execute the following command in linux
nohup "+HOMEDIR+"/postgresql/bin/postgres -D "+HOMEDIR+"/postgresql/data > "+HOMEDIR+"/postgresql/logfile 2>&1 &
while running java application. By this I want to start a background process that will not terminate when I exit my java program. That is why I do not want to use Threads.
When using Runtime.exec() to do the job I have no errors and no result. I tried different combinations and I concluded that special characters like > and & are the bottleneck.
What should I do to execute a command like that?
Thank you for your time
Dimitry
Similar Threads
-
runtime.exec
By cotede2 in forum Advanced JavaReplies: 3Last Post: 04-17-2009, 05:18 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 -
Problem with Runtime.exec()
By nhabibi in forum Advanced JavaReplies: 11Last Post: 07-02-2008, 01:35 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks