Dynamic Runtime Loading

Hi to everyone! I'm trying to make a dynamic runtime like this:

Class myClass = Class.forName(args[0]);

Method myMethod = findMainMethod(myClass);

// findMainMethod makes me get the main method of myclass

myMethod.invoke(null,new Object[]{args} );

When I use the method "Invoke" I have to introduce in it's second paramether the paramethers of myMethods as an array of String values. For example, if I have to introduce a float and an integer I have to make an array like this {"12.5","3"}. The problem that I have is that the function which I'm trying to make an "invoke" has an array of floats as a paramether. How can I make it works?

Thanks a lot!!!

[817 byte] By [Koeninga] at [2007-10-1 12:12:22]
# 1
Use an array of string instead of a floats in the invoke method. Parse the strings in the string array to get the float by using Float.parseFloat("string")...Rishi
Rishi_Kumara at 2007-7-10 14:13:00 > top of Java-index,Other Topics,Algorithms...
# 2
why are you suing String? new Object [] {"12.5","3"}if your parameters are Float.new Object[]{ new Float(12.5), new Float(3) }
tnguyen1973a at 2007-7-10 14:13:00 > top of Java-index,Other Topics,Algorithms...