Skip to content
Snippets Groups Projects
Commit fd874a4b authored by Branden's avatar Branden
Browse files

Added runApplication method

parent 7ec8b33f
No related branches found
No related tags found
2 merge requests!65Prototype,!48Feature detect program/launch application
package model;
import java.awt.*;
import java.io.File;
import java.io.IOException;
public class LaunchApplication {
public static void runApplication(String FilePath){
File application = new File(FilePath);
String Name = application.getName();
try {
boolean alreadyRunning = DetectProgram.isRunning(Name);
if(alreadyRunning == false){
Desktop.getDesktop().open(application);
}
}
catch (IOException ex){
System.out.println(ex.toString());
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment