diff --git a/src/net/java/sip/communicator/launcher/SIPCommunicatorJWS.java b/src/net/java/sip/communicator/launcher/SIPCommunicatorJWS.java
index 51c02c43d..0ba3dd916 100644
--- a/src/net/java/sip/communicator/launcher/SIPCommunicatorJWS.java
+++ b/src/net/java/sip/communicator/launcher/SIPCommunicatorJWS.java
@@ -23,6 +23,48 @@ public static void main(String[] args) throws Exception
// allow access to everything
System.setSecurityManager(null);
+ // optional: the name of another class with a main method
+ // that should be started in the same JVM:
+ String chainMain = System.getProperty("chain.main.class");
+ if(chainMain != null)
+ {
+ // optional: a space-separated list of arguments to be passed
+ // to the chained main() method:
+ String chainArgs = System.getProperty("chain.main.args");
+ if(chainArgs == null)
+ {
+ chainArgs = "";
+ }
+ final String[] _chainArgs = chainArgs.split("\\s");
+ try
+ {
+ Class> c = Class.forName(chainMain);
+ final Method m = c.getMethod("main", _chainArgs.getClass());
+ new Thread()
+ {
+ public void run()
+ {
+ try
+ {
+ m.invoke(null, new Object[]{_chainArgs});
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ System.err.println("Exception running the " +
+ "chained main class, will continue anyway.");
+ }
+ }
+ }.start();
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ System.err.println("Exception finding the chained main " +
+ "class, will continue anyway.");
+ }
+ }
+
// prepare the logger
// needed by the FileHandler-Logger
SIPCommunicator.setScHomeDir(System.getProperty("os.name"));
diff --git a/web-start/client.jnlp_template b/web-start/client.jnlp_template
index 58079dd5f..b58519f34 100644
--- a/web-start/client.jnlp_template
+++ b/web-start/client.jnlp_template
@@ -83,6 +83,11 @@
+
+
+
@@ -95,6 +100,11 @@
@COMMON@
+
+
+
+