Run third-party applications

Need Java program to run a third-party application WITHOUT waiting for closing of the running application.
For example:
launched jar'nick opened Notepad (windows environment) and was completed Agnico
October 3rd 19 at 04:40
2 answers
October 3rd 19 at 04:42
Solution
Sort it out with his program. Why is she waiting for something? It causes Process.waitFor()? Because otherwise the calling program does not wait for completion of the called. Here is the code for example:
import java.io.IOException;

public class Run {
 public static void main(String[] args) {
 try {
 new ProcessBuilder("/usr/bin/kwrite").start();
 } catch (IOException e) {
e.printStackTrace();
}
}
}

Runs the program and exits (in Linux). Substitute launch notepad and check. Is the Java program exits?
public static void main(String[] args) {
try {
new ProcessBuilder("notepad").start();
} catch (IOException e) {
e.printStackTrace();
}
}

The notebook opened, the program hangs while running do not close Notepad — remains an open question.
How to open Notepad without closing it to complete Java application - Kaycee.Gulgowski21 commented on October 3rd 19 at 04:45
Findaproperty. Let's see if it will help. In General, you need to find an analogue to nohup on windows. Can start /p notepad instead of notepad will help? - beatrice.Morissett commented on October 3rd 19 at 04:48
Thanks for help

String commandLine = "rundll32 shell32.dll,ShellExec_RunDLL" + path;
- Kaycee.Gulgowski21 commented on October 3rd 19 at 04:51
October 3rd 19 at 04:44
I need to run the program from Java and close the Java application. While the launched program will continue.
I have just start the app and I can't complete the work in a Java application. I.e. it is waiting to be completed when they launched the app.

Find more questions by tags JavaJava Native Interface