Launch of the application by java



  • How with help java Start a graphic annex from Linux, have access to consoles.



  • Use it. https://docs.oracle.com/javase/7/docs/api/java/lang/ProcessBuilder.html

    ProcessBuilder builder = new ProcessBuilder("gedit");
    Process process = builder.start();
    

    If the program has parameters, they need to be written in a comma.

    ProcessBuilder builder = new ProcessBuilder("gedit","a.txt");
    Process process = builder.start();
    

Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2