Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Fahimah Khan   on Aug 25 In Java Category.

  
Question Answered By: Sherri Parker   on Aug 25

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;

}

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: