Launching a class file from another class file
I have been charged with integrating a custom class file with some additional features for one of our customers. Rather than rip apart the original class file, adding the features and recompiling, my thought was to create a "wrapper" class file which fulfilled the additional features and 'call' the other class file as one would call a batch file from inside another.
Is this possible? If so, how?
> I have been charged with integrating a custom class
> file with some additional features for one of our
> customers. Rather than rip apart the original class
> file, adding the features and recompiling, my thought
> was to create a "wrapper" class file which fulfilled
> the additional features
You could extend the old class.
> and 'call' the other class
> file as one would call a batch file from inside
> another.
>
> Is this possible? If so, how?
Why do you need to run the file?
There is nothing special about the main() method of a class; therefore, you can just execute the main() method of the old class from your new class and pass the String[] args array that was passed to your new class' main() method.
jbisha at 2007-7-12 19:30:34 >

No, it's not possible like that - somehow you need to prove an instance of the new class to that software, and if you can't configure that you have a problem.
If you can, think about simply extending the old class. Then you still have to see that these new features are actually called.
Your problem description is very vague, and explanations like "launch a class from another class" doesn't get my hopes about OO knowledge high, either.