Recently use Swing, feeling trouble, but the needs of the project, only give up my favorite EJB, come to Swing. In the development process, there is such a function to share with you. The following statement feature is to start JBoss servers with a Java program. // S1 is the command string string S1 = "cmd / e: on / c start"; // s2: is the BAT file path to the call String S2 = jbccmpath; // .. C: / jboss / bin / run. Bat try {process processime (). EXEC (S1 S2);} catch (exception ex) {ex.printstackTrace ();} // Over Just put the above function to the main function, you can start JBoss. Call the same files!