Today I faced a situation where I need to verify something though Java class in database . My problem was I have to do this inside unix shell script. I created the below solution to achieve that, I am posting here sample working code:
JAVA CLASS
public class Sample
{
public static void main(String args[])
{
//Do the complete logic and print the result using system out
System.out.println(“Sample Testing”);
}
}
Shell Script