Hi all. I have one problem:
I´m using javassist in a program I´m developing, well to the point:
I have a GUI, the users uses this GUI for some configurations and press the PLAY button. When the user press it I do this:
 //get the Default ClassPool
 javassist.ClassPool cp = javassist.ClassPool.getDefault();
 //Add the classpath of the system to the classpool
 for (int i = 0; i < vstringClassPath.length; i++)
 cp.appendClassPath(vstringClassPath);
 //Initialize a Loader and call the Controler
 javassist.reflect.Loader loader = new javassist.reflect.Loader();
 loader.setClassPool(cp);
 loader.main(new String[] {"Controler"});
 The Controler make some work with the paremeters the user has chosen and call the program the user has specified( I have a program that runs another program).
 The user program is not in the classpath that´s why I had to put the User´s ClassPath in the loader ClassPath.
 One of the things the Controler does is make some classes the user has chosen reflective.
 After that I run the user program. Code above:
 //Get the parent ClassLoader
 javassist.reflect.Loader loader = (javassist.reflect.Loader)Controler.class.getClassLoader();
 //Make the user´s class reflective
 for (int i = 0; i < classList.size(); i++)
 loader.makeReflective((String) classList.elementAt(i),
 "InjetorFis",
 "javassist.reflect.ClassMetaobject");
 //Run the system
 loader.run(mainClass, params);
 This works ok with almost everything.
 Now the problem: when the user has a program that creates another GUI the run method return after the GUI was created and my program terminate. I need it to stop there and wait the user to close his GUI.
 I have tried things with Threads but I couldn´t make it stop there.
 I hope I could explain my problem well.
 Thanks for your time, javassist is very good!! I hope someone can help me.