?
=?ISO-8859-1?Q?Arne_Vajh=F8j?=
Roedy said:If it is written in Java it must have a main method. Other wise how
would you start it?
App means (no guarantee of interface) and (a static main method)
Arne
Roedy said:If it is written in Java it must have a main method. Other wise how
would you start it?
Christian said:but without exec the program will run in the same jvm...
...may be sharing
the same singletons..
Andrew said:Of course.
It is not suitable for all situations, and he OP has since(?)
clarified that this task needs to be done in a separate JVM.
And to the OP - do you now see the advantage of actually
*describing* the problem domain, rather than simply give a
vague description and 'what you want to do'?
With a static initializer?
(The JVM might still require a main method.)
App means (no guarantee of interface) and (a static main method)
Andrew Thompson said:Christian wrote:
It is not suitable for all situations, and he OP has since(?)
clarified that this task needs to be done in a separate JVM.
And to the OP - do you now see the advantage of actually
*describing* the problem domain, rather than simply give a
vague description and 'what you want to do'?
Yao said:Is OP me here?
...I think I described my question clearly. Here is what I
posted here in this thread,
"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."
Is the description vague?
No.
...If there is something confusing, point it
out. I would like to improve my English skills.
Roedy said:Application implies you can start it from the command line. That
implies a main method.
But it does definitely not imply an interface with a non
static method which your solution required.
Roedy said:Yes, the Class.forName approach requires the you to implement some
common interface in your dynamic classes.
No it does not.
You can use reflection instead.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.