Pregunta

I want to add new process using ProcessBulder class in Java. But process name is taken from user input then how to set the path?

The user only enter the process name like firefox.exe, but it does not start directly, it throws PathNotFoundException. How can I identify the path of user's input? Or how should I start the process which entered by the user?

¿Fue útil?

Solución

It should be either full path or the program should be in a folder known to OS via PATH variable, or the program should be in working dir

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top