Sub Process_Globals
Private fx As JFX
Private MainForm As Form
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
'MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
MainForm.Show
Private nativeMe As JavaObject=Me
nativeMe.RunMethod("RunFiles",Array("c:\Clock.exe",""))
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub
#If JAVA
import java.io;
import java.lang.Object;
Public static void RunFiles(String exepath, String exeargs) throws IOException {
Try {
Runtime r = Runtime.getRuntime();
r.exec(exepath +" "+exeargs);
} Catch (IOException e) {
e.printStackTrace();
}
}
#End if