Re: Launch a new java app from a java program



On Jun 29, 12:30 pm, Yao Qi <qiyao...@xxxxxxxxx> wrote:
I want to write a java program A to launch another java app B. I hope I
could configure the argument of VM to launch java app B, just like what
Eclipse JDT does.(Eclipse is a java program, and it could launch other
java apps.) I do not want to create a new thread for java app B. I
prefer to run java app B on another process separately.

How could I do this?

Best Regards

--
Yao Qi <qiyao...@xxxxxxxxx> GNU/Linux Developerhttp://duewayqi.googlepages.com/

"The world is beating a path to our door"

-- Bruce Perens, (Open Sources, 1999 O'Reilly and Associates)

http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html#exec(java.lang.String)

Runtime.exec("command");

will probably do the trick.

-----
Ben
http://www.plink-search.com

.



Relevant Pages

  • Re: Launch a new java app from a java program
    ... could configure the argument of VM to launch java app B, ... I do not want to create a new thread for java app B. I ... It will *definitely* do the trick (we do it in a small number of places ... specific exec method...the one accepting a String array will almost ...
    (comp.lang.java.programmer)
  • Re: Launch a new java app from a java program
    ... clarified that this task needs to be done in a separate JVM. ... "I want to write a java program A to launch another java app B. I hope I ...
    (comp.lang.java.programmer)
  • Launch a new java app from a java program
    ... I want to write a java program A to launch another java app B. I hope I ... -- Bruce Perens, (Open Sources, 1999 O'Reilly and Associates) ...
    (comp.lang.java.programmer)