works ok for me.

Class theClass = Class.forName ("com.company.whatever...");
Method method = theClass.getMethod ("main", new Class...);
method.invoke (...);

of course the class has to be visible to the 
activity - "in the class path" as it were.

just like a regular VM. Java wouldn't be much of a Java without this stuff :-)



>I think this is a valid Android question, as Android might handle this
>differently than standard JavaSE. Specifically, JavaSE lets you do
>this and (to the best of my knowledge) Android does not.
>
>
>
>Yusuf Saib
>Android
>·T· · ·Mobile· stick together
>The views, opinions and statements in this email are those of the
>author solely in their individual capacity, and do not necessarily
>represent those of T-Mobile USA, Inc.
>
>
>
>On Aug 25, 10:45 pm, efan <[email protected]> wrote:
>>  use java.lang.Process
>>
>>  Maybe it's better to ask pure Java questions in sun Java forum?
>>
>>  Good luck!
>>
>>  On Aug 23, 10:03 am, srinivasarao <[email protected]> wrote:
>>
>>
>>
>>  > hi Sir,
>>  >           Take Class name as input (command line) and loads that class
>>  > Dynamically and calls the main method in that class..how will we do
>>  > that?
>

-- 
jason.vp.engineering.particle

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to