Java: Executing a Java application in a separate process

Posted by _ande_turner_ on Stack Overflow See other posts from Stack Overflow or by _ande_turner_
Published on 2009-03-11T21:06:03Z Indexed on 2010/06/08 12:42 UTC
Read the original article Hit count: 179

Filed under:
|
|

Can a Java application be loaded in a separate process using its name, as opposed to its location, in a platform independent manner?


I know you can execute a program via ...

Process process = Runtime.getRuntime().exec( COMMAND );

... the main issue of this method is that such calls are then platform specific.


Ideally, I'd wrap a method into something as simple as...

EXECUTE.application( CLASS_TO_BE_EXECUTED );

... and pass in the fully qualified name of an application class as CLASS_TO_BE_EXECUTED.

© Stack Overflow or respective owner

Related posts about java

Related posts about processes