As a part of my program, I have a connections manager that receives a connection from a client, and then gives the client a port number and a password to use to connect. A
Include jar in the classpath and call the main method of the Main-class of the jar from your main.
Suppose Main-class of CytoscapeInterface.jar is JarMain.class (You can look it up in META-INF of CytoscapeInterface.jar), then from your program, call it like this:
JarMain.main(new String[]{"arg1", "arg2"});
You can also call it from a new Thread so that you can continue with your program.
new Thread(
new Runnable() {
public void run() {
try {
JarMain.main(new String[]{"arg1", "arg2"});
} catch (Exception e) {
e.printStackTrace();
}
}
}).start();