Find Taverna's home directory (and open it for Windows/OSX/Linux)
open
net.sourceforge.taverna.scuflworkers.io.LocalCommand
explorer
net.sourceforge.taverna.scuflworkers.io.LocalCommand
gnome-open
net.sourceforge.taverna.scuflworkers.io.LocalCommand
try {
// Call ApplicationRuntime.getInstance().getApplicationHomeDir() by introspection
// so this does not fail the beanshell script in Taverna 1
emptyClass = new Class[]{};
emptyArgs = new Object[]{};
AppRuntime = Class.forName("net.sf.taverna.raven.appconfig.ApplicationRuntime");
getInstance = AppRuntime.getMethod("getInstance", emptyClass);
appRuntime = getInstance.invoke(null, emptyArgs);
tavernaHome = appRuntime.getApplicationHomeDir().toString();
} catch (Throwable t) {
// t.printStackTrace();
tavernaHome = System.getProperty("taverna.home");
}
tavernaHome