Java program outputs nothing when run using Jupyter

I installed the iJava kernel for Jupyter and am able to execute standalone java statements in the notebook and lab, but when I run simple programs, nothing happens - no error, no output!

System.out.println(“Hello World!”); when run in a cell works fine, but a simple class with a main() function doesn’t !

Is there any issue with environment setup?