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