Results 1 to 1 of 1
- 07-13-2009, 06:22 PM #1Member
- Join Date
- Jan 2009
- Rep Power
Running system comman with special symbols using Runtime.exec()
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
- By cotede2 in forum Advanced JavaReplies: 3Last Post: 04-17-2009, 06:18 PM
- By Lanfear in forum New To JavaReplies: 18Last Post: 12-16-2008, 12:09 PM
- By karine in forum IntroductionsReplies: 1Last Post: 10-03-2008, 09:25 AM
- By hknyo in forum Advanced JavaReplies: 2Last Post: 08-16-2008, 01:40 AM
- By nhabibi in forum Advanced JavaReplies: 11Last Post: 07-02-2008, 02:35 AM