Sub AppStart (Args() As String)
Log(asJO(Me).RunMethod("whereAmI",Array(Me)))
End Sub
Sub asJO(o As JavaObject)As JavaObject
Return o
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.net.*;
public static String whereAmI(Class c) throws URISyntaxException, IOException{
return new File(c.getProtectionDomain().getCodeSource().getLocation().toURI()).getParent();
}
#End If