How to create instances of same java class running in same process? : I am learning Java Process and I am trying to create two instances of same java class running in same process which is a requirement.

Class Chat {

public void getMessage() {
***  some implementation
}

}

class ProcessMain {

public static void main(String args[])  {


 Chat c1 = new Chat();
 Chat c2 = new Chat();

  ProcessBuilder pb = new ProcessBuilder(c1);
****   here is where I am  stuck. 

Two instances of same class should run in same process

}

}

Can anyone give me a lead?
