public class MainClass { public static main(String[] args) { //Run my app }}
In this case lets make the connection this way.:
public class MainLorduiClass { public static main(String[] args) { ktm.lordui.Lordui lui = ktm.lordui.Lordui.createInstance(); try { lui.loadProject(new File("myLorduiProcedureFile.lui")); } catch (IOException e) { e.printStackTrace(); return; } lui.setVisible(true); MainClass.main(args); lui.runProcedureAndWait("LorduiProcedureName"); }}Please find we missed close() command on the end. If only there is possibility to run it somewhere on the end - please do it. If not, please close the Lordui window manualy to perform correct resources dispose(before it will be close eg with
System.exit(0)command). Such a prepared Class you may pack into jar and run as a main one.