I have a jar files that holds alot of classes, in each class there are static methods that i have to call them from .sh file.
I have Function class for each module, this class aggregate all the methods in the module.
example:
public class Functions{
public static String e1(){return e1.e1();}
public static Integer e2(){return e2.e2();}
}
public class e1{
public static String e1(){
//do something
}
}
public class e2{
public static Integer e2(){
//do something
}
}
I want to call the functions in Function class from sh file:
result=$jar.Functions.e1()
I readed that this is the only solution:
"The only java method you can call from a shell script is the main method of a class, by starting that class with a java command line execution."
is it correct?