I use the Runtime class to complete the software installation part. However, it does not work, which means that after I run the task (which is created using the Runtime class), after a while (which is very soon), the installation task simply ends. I think the problem is that the main thread should end and thus kill the process created using the Runtime class. I'm right? And what is the solution here?
this is how i start my work inside the main class:
try { Runtime.getRuntime().exec(cmd); } catch(IOException e) {
Shortly after this command, the main function ends.
No problem with the Runtime team. He works. I even see how it starts (installing taht I shoot through the code), and then it suddenly exits.
Chani source share