IsaacLevon
IsaacLevon

Reputation: 2570

Do you need to close a process opened by Java?

Consider the following:

new ProcessBuilder(pathToSomeExectuable).start();

What will happen when the current Java application will be closed? In other words, is the Process running as daemon and will automatically closed? Or, do I need to call destroy()?

Upvotes: 3

Views: 339

Answers (1)

Juraj Martinka
Juraj Martinka

Reputation: 4358

[At least on linux] the subprocess aren't automatically terminated when the parent process exits.

Read these resources for more information:

Upvotes: 1

Related Questions