Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Abbie Cohen   on Dec 09 In Java Category.

  
Question Answered By: Phoebe Brown   on Dec 09

use java.lang.reflect in a soket server that accepts main class definition from
a
port.

ex:
- u'll send "LOAD com.filika.project.runner.Runner" from soket to your server
program
- server program  'll find the main class and loads it to its vm that running
with the
help of reflect package.
- and also u can send more initial parameters with reflect ->more at:
java.sun.com

or u can define a generic interface like

public interface MyLoadable{
public void load() throws Exception;
public void start()throws Exception;
public void stop()throws Exception;
public void unload()throws Exception;

}

than u can create your apllications using this interface, making a little
expansion
to the example above.

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Run Another Java App in Current JVM Or get search suggestion and latest updates.


Tagged: