The task is to invoke a method from another Java compiled .class file. File is located in different location (e.g. C:\Downloads\Task.class) and already compiled. Method, which shoud be invoked is static and consumes FileOutputStream OR returns String:
public static void task(FileOutputStream out, String[] args) {...}
or
public static String task(String[] args) {... return result;}
Is there any possible way to do this? Can I do a classload of class, located in different folder, or shoud I just save classfile to a location, where class with main method is?
Aucun commentaire:
Enregistrer un commentaire